Unable to call method on resource, works in Rust guest but not JS guest
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, rust, wasm
- Lĩnh vực
- tooling
Hướng nghiên cứu
Tái hiện crash với template cube-js và so sánh với template cube-rust đang hoạt động, tập trung vào dòng 194 của game.js. Sau đó kiểm tra node_modules/@bytecodealliance/ComponentizeJS, tích hợp @rune-runtime/rollup-plugin-rune và trap được báo cáo tại crates/rune/src/runtime/mod.rs:97. Được xem là hoàn tất khi guest JavaScript có thể gọi pipeline.getBindGroupLayout(0) mà không gặp trap unreachable của wasm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I've got a bit of a challenging one here. It's hard to trace the issue because I don't have debug information available from SpiderMonkey (will traces from the engine be available via some debug mode at some point?)
I have a repro but it requires my toolchain. Shouldn't take long to set up:
- Grab the latest
rune-clirelease from https://github.com/rune-runtime/rune/releases/tag/v0.1.11 (or usecurl -fsSL https://rune.sh/install.sh | bashto installrunelocally) -- I think you'll need a Mac for this for the time being. - Create a new directory, ie.
test& cd into it - Run
rune new game --template cube-js-- this will create a new Rune project in the current directory - Run
npm i - Run
rune run. Observe that the program crashes with [1] - In
game.js, comment out line 194 andrune runagain. Observe the program does not crash.
This invocation, pipeline.getBindGroupLayout(0) works in my Rust wasm32-wasip1 guest module (you can try it by doing rune new game --template cube-rust) Because of this, I believe there is a bug in ComponentizeJS. Without better debugging I can't say for certain.
If you need to debug the use of ComponentizeJS in my toolchain, you should refer to the module in node_modules/@bytecodealliance/ComponentizeJS, which is used by the @rune-runtime/rollup-plugin-rune Rollup plugin to build a wasm module for Rune.
[1]
Message: Game didn't initialize: error while executing at wasm backtrace:
0: 0x2f363 - <unknown>!<wasm function 451>
1: 0x2f36c - <unknown>!<wasm function 452>
2: 0x22ee52 - <unknown>!<wasm function 5253>
3: 0x7a8ac3 - <unknown>!rune:runtime/guest#init
Caused by:
wasm trap: wasm `unreachable` instruction executed
Location: crates/rune/src/runtime/mod.rs:97
Guidance is appreciated. Thanks.
- Ngôn ngữ chính
- Rust
- Star
- 392
- Fork
- 54
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 3
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 bytecodealliance/ComponentizeJS
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
bytecodealliance/ComponentizeJS#335 · 3 bình luận ·
Tất cả issue của bytecodealliance/ComponentizeJS
Issue tương tự
-
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 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 bình luận ·
-
Độ 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 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
Missing examples for `Allocator` Đang mởA-allocators A-docs C-enhancement T-libs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100