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
- 404
- Fork
- 61
- Merge trung bình
- 21 giờ 21 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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
-
Ship an Intl-enabled engineĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/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ự
-
Test connection's password prompt says the password is never saved, also for a keychain profileĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: settings bug Haiku review: no-score ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MMFoundation/WallpaperMachine#346 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make the HTTP server's keep-alive and headers timeouts configurableCó thể đã có người làm @mattgodbolt đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
compiler-explorer/compiler-explorer#9902 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jonathanong/no-mistakes#5490 ·
-
follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày