Building for wasm32-unknown-emscripten fails unless wasm-bindgen version is pinned
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust, wasm
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu với Cargo.toml và tái hiện lỗi bằng cargo +nightly build --target wasm32-unknown-emscripten. Đọc cách sử dụng closure trong src/queue.rs quanh các dòng 24 và 79, sau đó xác minh việc phân giải dependency đối với phiên bản wasm-bindgen đã được báo cáo; được xem là hoàn tất khi quá trình build target hoàn thành thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Rust
- Star
- 11
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bevyengine/web-task
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
bevyengine/web-task#4 · 5 bình luận ·
Tất cả issue của bevyengine/web-task
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yantrikos/yantrik-os#255 ·
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Đang mởbug CLI custom-model
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
raphamorim/rio#1956 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 bình luận ·