-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to call method on resource, works in Rust guest but not JS guest #148
Comments
Host code for this method is as follows:
The JS output by SpiderMonkey for this method is as follows:
|
A bug was fixed today in supporting resource names with multiple words - #151. It seems like your code was affected by this. While it's not necessarily the bug it certainly would have stopped this use case from working. Can you update to the latest ComponentizeJS release 0.13.1 from today and then share if that still gives the issue? |
No change unfortunately |
I see you're building with I'd recommend enabling it, as there may be useful debugging information available there. Another technique can be to make your main init script support throws by having it return a result: You could also try wrapping that line in a try-catch to output the stack through another means. Best though would just be if you could enable |
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:
rune-cli
release from https://github.com/rune-runtime/rune/releases/tag/v0.1.11 (or usecurl -fsSL https://rune.sh/install.sh | bash
to installrune
locally) -- I think you'll need a Mac for this for the time being.test
& cd into itrune new game --template cube-js
-- this will create a new Rune project in the current directorynpm i
rune run
. Observe that the program crashes with [1]game.js
, comment out line 194 andrune run
again. Observe the program does not crash.This invocation,
pipeline.getBindGroupLayout(0)
works in my Rust wasm32-wasip1 guest module (you can try it by doingrune 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]
Guidance is appreciated. Thanks.
The text was updated successfully, but these errors were encountered: