-
Notifications
You must be signed in to change notification settings - Fork 756
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
wasm2js output from AssemblyScript input hangs #7245
Comments
To debug this, I would add some logging in the source, to see where the wasm2js build starts to behave differently. If you can't figure it out that way, adding lower-level logging using binaryen is an option, like If you want, attach the wasm file here for us to investigate. |
Looks like the code hangs somewhere in
|
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
|
I don't see the wasm file in the archive? With the wasm file and a way to run it I could compare wasm to wasm2js. |
Thought I included the WASM... I've updated the AssemblyScript code (see AssemblyScript/assemblyscript#2901 (comment)) to fix the part I initially filed this issue for, though the I'm including the AssemblyScrip code, the WASM compiled using
The
With
With
See that |
I get this error with node 20:
|
That's Node.js clinging on to CommonJS. I'm running |
https://nodejs.org/en/blog/release/v20.10.0
|
I compiled AssemblyScript to WASM, then compiled WASM to JavaScript with
wasm2js
. The WASM works as expected withwasmtime
. The resulting JavaScript hangs when running withnode
,deno
, andbun
.I've done the same process described above with Rust source code, Bytecode Alliance's Javy, and Facebook's Static Hermes; that is, source code to WASM, WASM to JavaScript using
wasm2js
, then running that JavaScript with WASI support with a JavaScript runtime.This is the first time I have encountered code output by
wasm2js
hanging. I don't know if the issue is AssemblyScript source,wasm2js
output, or the WASI (preview1) implementation I'm using.The code
module.ts
or
At the bottom of the JavaScript output by
wasm2js
This just hangs until
^C
The text was updated successfully, but these errors were encountered: