Building for wasm32-unknown-emscripten fails unless wasm-bindgen version is pinned
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust, wasm
- Domain
- build-system
Research direction
Start with Cargo.toml and reproduce the failure using cargo +nightly build --target wasm32-unknown-emscripten. Read the closure usage in src/queue.rs around lines 24 and 79, then verify the dependency resolution against the reported wasm-bindgen version; done means the target build completes successfully.
Written by the indexing model from the issue text.
Description
cargo +nightly build --target wasm32-unknown-emscripten fails with
error[E0277]: the type `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
--> src\queue.rs:79:30
|
79 | Closure::new(move |_| state.run_all())
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
| |
| required by a bound introduced by this call
|
= help: within `QueueState`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>`
note: required because it appears within the type `Cell<isize>`
--> C:\Users\HeartofPhos\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\cell.rs:315:12
|
315 | pub struct Cell<T: ?Sized> {
| ^^^^
note: required because it appears within the type `RefCell<VecDeque<singlethread::Job>>`
--> C:\Users\HeartofPhos\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\cell.rs:852:12
|
852 | pub struct RefCell<T: ?Sized> {
| ^^^^^^^
note: required because it appears within the type `QueueState`
--> src\queue.rs:24:8
|
24 | struct QueueState {
| ^^^^^^^^^^
= note: required for `Rc<QueueState>` to implement `UnwindSafe`
note: required because `state` is used within this closure
--> src\queue.rs:79:39
|
79 | Closure::new(move |_| state.run_all())
| ^^^^^
= note: required for `{closure@src\queue.rs:79:30: 79:38}` to implement `wasm_bindgen::__rt::marker::MaybeUnwindSafe`
note: required by a bound in `ScopedClosure::<'static, T>::new`
--> C:\Users\HeartofPhos\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasm-bindgen-0.2.114\src\closure.rs:244:33
|
242 | pub fn new<F>(t: F) -> Self
| --- required by a bound in this associated function
243 | where
244 | F: IntoWasmClosure<T> + MaybeUnwindSafe + 'static,
| ^^^^^^^^^^^^^^^ required by this bound in `ScopedClosure::<'static, T>::new`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `web-task` (lib) due to 1 previous error
updating Cargo.toml with wasm-bindgen = { version = "=0.2.108", default-features = false } successfully compiles
- Dominant language
- Rust
- Stars
- 11
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bevyengine/web-task
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
bevyengine/web-task#4 · 5 comments ·
All issues in bevyengine/web-task
Similar issues
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rocky-data/rocky#2181 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Openbot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
midnightntwrk/midnight-indexer#1557 ·