Wasmex.Wasi.PreopenOptions (wasmex v0.8.3)

Options for preopening a directory.

Likely to be extended with read/write permissions once wasmtime supports them.

options

Options

  • :path - The path to the directory to preopen
  • :alias - The alias to use for the directory. The directory will be available at this path in the WASI filesystem. If not specified, the directory will be available at its real path.

example

Example

  iex> Wasmex.Store.new_wasi(%Wasmex.Wasi.WasiOptions{
  ...>   preopen: [
  ...>     %PreopenOptions{path: "/tmp", alias: "temp"}
  ...>   ],
  ...> })

Link to this section Summary

Link to this section Types

@type t() :: %Wasmex.Wasi.PreopenOptions{alias: String.t() | nil, path: String.t()}