Wasmer::Wasi::StateBuilder
Inherits Reference / Object
Convenient API for configuring WASI
Class methods
builder(program_name : String, &) : Environment
SourceInstance methods
build
Builds the state builder to produce a WasiEnvironment. It consumes the current WasiStateBuilder
with_env(key : String, value : String)
Configures a new environment variable for the WASI module
with_map_dir(_alias : String, dir : String)
Configures a new directory to pre-open with a different name exposed to the WASI module.
with_preopen_dir(dir : String)
Configures a new directory to pre-open.
This opens the given directory at the virtual root /, and allows the WASI module to read and write to the given directory.