Unable to call method on resource, works in Rust guest but not JS guest
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, rust, wasm
- Ambito
- tooling
Direzione di ricerca
Riproduci il crash con il template cube-js e confrontalo con il template funzionante cube-rust, concentrandoti sulla riga 194 di game.js. Poi esamina node_modules/@bytecodealliance/ComponentizeJS, l’integrazione di @rune-runtime/rollup-plugin-rune e il trap segnalato in crates/rune/src/runtime/mod.rs:97. Il lavoro è completato quando il guest JavaScript può chiamare pipeline.getBindGroupLayout(0) senza il trap wasm unreachable.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 392
- Fork
- 54
- Merge medio
- 2g 18h
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bytecodealliance/ComponentizeJS
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
bytecodealliance/ComponentizeJS#335 · 3 commenti ·
Tutte le issue di bytecodealliance/ComponentizeJS
Issue simili
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Apertabug CLI custom-model
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100