Stream: jco

Topic: Issue when `println!` in cargo component


view this post on Zulip Damian Reeves (Jun 03 2024 at 21:14):

I am trying to extend a Node CLI app via WebAssemby. I have all the build pipelines setup to use cargo-component to create a WebAssembly component, and then jco transpile to generate the relevant Javascript code.

I run into an issue where executing my Node based CLI works if I don't execute println in my Rust code, but it freezes/hangs if I do executing println. Is there any examples of this scenario I can follow? Or does anyone know what might be happening? Do I need to explicitly enable WASI support or something?

view this post on Zulip Guy Bedford (Jun 03 2024 at 21:28):

Can you share the component as a bug on the Jco repo further, and I'd be happy to take a look

view this post on Zulip Damian Reeves (Jun 03 2024 at 21:29):

Sure let me extract it from my project so I can give you a more isolated reproduction.

view this post on Zulip Damian Reeves (Jun 03 2024 at 22:08):

Stripped things down in this repo: DamianReeves/wasm-components-ftw (github.com)

Contribute to DamianReeves/wasm-components-ftw development by creating an account on GitHub.

view this post on Zulip Damian Reeves (Jun 12 2024 at 05:28):

Just realizing you mentioned to file a bug on the jco repo. Gonna go and do that.


Last updated: Nov 22 2024 at 16:03 UTC