# `Wasmex.Wasi.WasiOptions`

Configures WASI support for a Wasmex.Store.

## Options

  * `:args` - A list of command line arguments
  * `:env` - A map of environment variables
  * `:preopen` - A list of `Wasmex.Wasi.PreopenOptions` to preopen directories
  * `:stdin` - A `Wasmex.Pipe` to use as stdin
  * `:stdout` - A `Wasmex.Pipe` to use as stdout
  * `:stderr` - A `Wasmex.Pipe` to use as stderr

## Example

    iex> {:ok, stdin} = Wasmex.Pipe.new()
    iex> Wasmex.Store.new_wasi(%Wasmex.Wasi.WasiOptions{
    ...>   args: ["first param", "second param"],
    ...>   env: %{"env_key" => "env_value"},
    ...>   preopen: [
    ...>     %Wasmex.Wasi.PreopenOptions{path: "/tmp"}
    ...>   ],
    ...>   stdin: stdin,
    ...> })

# `t`

```elixir
@type t() :: %Wasmex.Wasi.WasiOptions{
  args: [String.t()],
  env: %{required(String.t()) =&gt; String.t()},
  preopen: [Wasmex.Wasi.PreopenOptions],
  stderr: Wasmex.Pipe | nil,
  stdin: Wasmex.Pipe | nil,
  stdout: Wasmex.Pipe | nil
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
