Wasmex.Wasi.WasiOptions (wasmex v0.9.2)
Configures WASI support for a Wasmex.Store.
Options
:args
- A list of command line arguments:env
- A map of environment variables:preopen
- A list ofWasmex.Wasi.PreopenOptions
to preopen directories:stdin
- AWasmex.Pipe
to use as stdin:stdout
- AWasmex.Pipe
to use as stdout:stderr
- AWasmex.Pipe
to use as stderr
Example
iex> {:ok, stdin} = Wasmex.Pipe.new()
iex> Wasmex.Store.new_wasi(%WasiOptions{
...> args: ["first param", "second param"],
...> env: %{"env_key" => "env_value"},
...> preopen: [
...> %Wasmex.Wasi.PreopenOptions{path: "/tmp"}
...> ],
...> stdin: stdin,
...> })