Failure to compile with js feature and -C target-feature=+atomics #796

Closed
opened 2025-02-04 22:24:51 -06:00 by bushrat011899 · 3 comments
bushrat011899 commented 2025-02-04 22:24:51 -06:00 (Migrated from github.com)

Description

Building with target-feature=+atomics on wasm32-unknown-unknown with the v4 and js features currently fails due to js_sys being referenced but not included as a dependency. This was first noticed here.

This is present on main and in 1.13.

Replication

On Windows

$env:RUSTFLAGS="-C target-feature=+atomics"; cargo +nightly check --target wasm32-unknown-unknown -Z build-std=std,panic_abort --features v4,js

On Ubuntu

RUSTFLAGS="-C target-feature=+atomics" bash -c 'cargo +nightly check --target wasm32-unknown-unknown -Z build-std=std,panic_abort --features v4,js'
# Description Building with `target-feature=+atomics` on `wasm32-unknown-unknown` with the `v4` and `js` features currently fails due to `js_sys` being referenced but not included as a dependency. This was first noticed [here](https://github.com/bevyengine/bevy/actions/runs/13149675935/job/36695203159?pr=17689). This is present on `main` and in 1.13. # Replication _On Windows_ ```powershell $env:RUSTFLAGS="-C target-feature=+atomics"; cargo +nightly check --target wasm32-unknown-unknown -Z build-std=std,panic_abort --features v4,js ``` _On Ubuntu_ ```bash RUSTFLAGS="-C target-feature=+atomics" bash -c 'cargo +nightly check --target wasm32-unknown-unknown -Z build-std=std,panic_abort --features v4,js' ```
bushrat011899 commented 2025-02-04 22:30:52 -06:00 (Migrated from github.com)

Appears to have been introduced here, and this specific feature combination just hasn't been checked between now and then.

Appears to have been introduced [here](https://github.com/uuid-rs/uuid/commit/0729e002865616abb7bc787b75d080d3b1b787f5), and this specific feature combination just hasn't been checked between now and then.
KodrAus commented 2025-02-04 22:44:00 -06:00 (Migrated from github.com)

Thanks for the report! I'll get this patched up

Thanks for the report! I'll get this patched up
bushrat011899 commented 2025-02-04 22:45:06 -06:00 (Migrated from github.com)

Almost the exact same time, that's wild haha.

Almost the exact same time, that's wild haha.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-uuid-rs/uuid#796
No description provided.