Wasmex.Wasi.WasiOptions (wasmex v0.13.0)
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.PreopenOptionsto preopen directories:stdin- AWasmex.Pipeto use as stdin:stdout- AWasmex.Pipeto use as stdout:stderr- AWasmex.Pipeto 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,
...> })