-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Labels
🎉 enhancementNew feature or requestNew feature or request
Description
Motivation
It is quite common to have to provide a pre-determined stdin value to a Wasm module, without having to expose a full file system to it.
Proposed solution
leverage this function:
https://docs.wasmtime.dev/c-api/wasi_8h.html#a525abd98ade58887a969b796ea05468e
would require modifying
wasmer-go/wasmer/packaged/include/wasmer.h
Lines 705 to 707 in ca60a45
#if defined(WASMER_WASI_ENABLED) | |
void wasi_config_inherit_stdin(struct wasi_config_t *config); | |
#endif |
and
Lines 196 to 202 in ca60a45
// InheritStdin configures the WASI module to inherit the stdin from | |
// the host. | |
func (self *WasiStateBuilder) InheritStdin() *WasiStateBuilder { | |
C.wasi_config_inherit_stdin(self.inner()) | |
return self | |
} |
Alternatives
The best alternative at the moment is passing the value as argument on the command line, but that's not great for large and / or binary values.
Metadata
Metadata
Assignees
Labels
🎉 enhancementNew feature or requestNew feature or request