bytecodealliance / jco

JavaScript tooling for working with WebAssembly Components
https://bytecodealliance.github.io/jco/
Apache License 2.0
571 stars 53 forks source link

Calling into a component that includes the println macro hangs #449

Open DamianReeves opened 3 weeks ago

DamianReeves commented 3 weeks ago

Calling into the component built here, results in a hang as long as a println! is included.

As seen here: https://github.com/DamianReeves/wasm-components-ftw/blob/5a85c47fdc62288cb46952484f760231073c5152/crates/morphir-platform/src/lib.rs#L11-L15

If I remove the println things work fine.

Not sure if its relevant, but if I transpile with tracing, I notice when I insert a println! call, my code seems to hang on the following wasi call is traces:

[module="wasi:cli/stdin@0.2.0", function="get-stdin"] call
guybedford commented 2 weeks ago

Thanks for posting. Unfortunately I was unable to build this test case on arm64. Can you just share the direct component binary that is causing the issue?