Allow specifying which file descriptor is used in console.{log,err} from the CLI
Operating system: windows + wsl2-ubuntu, windows Processor architecture: x86_64 Rust version: rustup 1.27.0 Javy version: javy 1.4.0
Problem
After compiling console.log("test") into .wasm file and executing it with wasmtime I get output on stderr instead of stdout.
I verified that its not an wasmtime problem by compiling and running simple c program with printf("test\n"). Testing was done in windows and wsl2 with ubuntu on windows and in happens in both cases.
It indeed does. I believe we should make this behavior configurable from the CLI level too, because currently it's not standard. For some context, some use-cases require tight control over which stream is used for console.{log,err}, however, in this case the non-standard behavior has "leaked" as the standard one.
I'll switch the label and title of the issue to reflect that we want to make this behavior configurable.
In the latest main, it's now possible to override this behavior, by doing javy build index.js -J redirect-stdout-to-stderr=n -o index.wasm