-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Why is wasm2js from AssemblyScript input hanging? #2901
Comments
I'm confused...what's the source code? |
Compiled with
|
Then using Binaryen's
I do the same or similar with Bytecode Alliance's Javy, Rust, and Facebook's Static Hermes https://gist.github.com/guest271314/b10eac16be88350ffcd19387e22ad4d5. Pardon, this is the WASI implementation I'm using https://github.com/guest271314/deno-wasi/blob/runtime-agnostic-nodejs-api/wasi.js. |
I think I figured out the issue in the source AssemblyScript code I included this part in the algorithm specifically for AssemblyScript because AssemblyScript is representing integers as decimals
That is, when I replace that part with
and run with
However, if I use that input WASM to
|
How do we get integers instead of decimals in AssemblyScript? |
Also, you can do |
That's it. Also requires |
Ah, you can have Anyhow, in AS, |
Alright, I am able to compile the source to JavaScript using Works with
and compile to JavaScript using Binaryen's
See that |
Question
I've compiled Rust source code to WASM, then compiled that WASM to JavaScript with
wasm2js
, then used a WASI implementation from here https://gitlab.com/-/snippets/4782260 to execute the JavaScript output bywasm2js
.I've done something similar with Bytecode Alliance's Javy, and Facebook's Static Hermes.
Here either arguments or
stdin
is read and passed to the relevant functionThe resulting JavaScript from the AssemblyScript source to WASM then to JavaScript hangs. Why? And how to fix this?
The text was updated successfully, but these errors were encountered: