Closed technosophos closed 3 years ago
Okay. Thank you. I will start with wasm3 itself and work my way from there. Thanks for providing the Rust bindings. I have been experimenting with them, and they are very easy to use.
I have been experimenting with them, and they are very easy to use.
That's nice to hear. I'm still having a bit of trouble figuring out the exact API I'd like to have(#4).
Hey there. I'm picking up the same work @technosophos was working on a few months ago.
For context, we are using this project over at https://github.com/deislabs/krustlet-wasm3 to execute WASI workloads in Kubernetes with the wasm3 runtime.
I did some digging and have not found a solution available under wasm3. It is not currently possible to pipe a function's output to a file like we can with wasmtime
. @Veykril's suggestion is correct here.
I'll keep looking upstream for ideas.
I've gone and dropped a question regarding this feature in the wasm3 discord.
Blocked on https://github.com/wasm3/wasm3/issues/147
Looks like wasm3-rs
is using a simplistic version of WASI implementation:
https://github.com/Veykril/wasm3-rs/blob/f064cbb09672a24170e5c0e33d05169d767468ca/wasm3-sys/build.rs#L158
It would be really cool if we could switch to uvwasi
(which is default, more complete and maintained).
As for redirecting stdout
/stderr
, it's absolutely doable with this approach: https://github.com/wasm3/wasm3/issues/147#issuecomment-636530465
Question is, do you need to redirect the output to an arbitrary file descriptor, or to register some kind of callbacks/hooks to intercept it. Also, what about stdin
?
Closing due to lack of interest
It would be nice to be able to specify a location to write to STDOUT so that the calling process can capture STDOUT. Is that something that is possible?