-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I am trying to do something like this.
stdin := bytes.NewReader([]byte("Hello, World\n"))
instance, err := runtime.InstantiateModule(ctx, wasmModule, wazero.NewModuleConfig().
WithStdin(stdin).
WithStdout(os.Stdout).
WithStderr(os.Stderr).
WithArgs(args...))However, the module still reads from os.Stdin instead of specified io.Writer. Any ideas?
Could this be related to the imports.Builder or sockets extension overriding the stdin configuration? Is there a way to force the module to use the custom io.Reader provided to WithStdin?
Steps to Reproduce:
1. Create a wasm module expecting stdin input.
2. Instantiate the module with `ModuleConfig.WithStdin` as above.
3. Observe that the module reads from actual stdin (`os.Stdin`) rather than the specified reader.
Expected behavior:
The module reads stdin input exclusively from the provided io.Reader.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels