-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SetStdout SetStdin #34
Comments
This is similar to bytecodealliance/wasmtime-py#34 where there's support for this in the Rust wasmtime API but support has yet to be added to the C API |
Bumping this, as it would be extremely useful to be able to pass stdin and get stdout from modules :) @alexcrichton if you have any advice on how we could help implement this, we'd love to contribute. |
Implementing this would first need to start out at the Wasmtime C API layer. There's not a ton of Wasmtime-specific prior art to choose from unfortunately, so the APIs for this at the C layer need to be designed from scratch and implemented. Once that's landed then the Go support can be built on top of that. |
Bumping this as well, I think it would be pretty handy to have this functionality implemented as in the Rust implementation. |
I saw that I cannot easily convert the string
path
inSetStdoutFile(path string)
to theio.ReadWriter
on wasmtime-go, so this is a suggestion to wasmtime.io.ReadWriter
is an interface which implemented byos.File
andbytes.Buffer
. With anio.ReadWriter
as the parameter for WASI config, golang can operate its favor bytes without filesystem-level io, which means the WASI call will be more easy safe and stable.The text was updated successfully, but these errors were encountered: