How do I get output from this file to appear in the console, it seems to just be swallowed up somewhere?
on wasm32-unknown-unknown, println! is a noop, you have to import JS console and call console.log, there are many crates that solve the problem in different ways, for example here's a crate that provides a custom println! macro https://github.com/DeMille/wasm-glue
I didn't realise main.rs
was compiled to wasm, I thought it was a host that orchestrated the runtime testing (creating the target language projects, compiling those to wasm, and running those)
I think stderr may be swallowed by default
but if you add inherit_stderr
there I think it should work?
Its the rust I'm trying to instrument, e.g. putting a println in run_test_from_dir
oh for that you might need to pass --nocapture
to cargo test
Last updated: Feb 28 2025 at 02:27 UTC