class Wasmer::Wasi::StateBuilder
- Wasmer::Wasi::StateBuilder
- Reference
- Object
Overview
Convenient API for configuring WASI
Defined in:
wasmer/wasi.crClass Method Summary
Instance Method Summary
-
#build
Builds the state builder to produce a
WasiEnvironment
. -
#with_arg(argument : String)
Configures a new argument to the WASI module
-
#with_capture_stderr
Configures the WASI module to capture its STDERR
-
#with_capture_stdout
Configures the WASI module to capture its STDOUT
-
#with_env(key : String, value : String)
Configures a new environment variable for the WASI module
-
#with_inherit_stderr
Configures the WASI module to inherit the STDERR from the host
-
#with_inherit_stdin
Configures the WASI module to inherit the STDIN from the host
-
#with_inherit_stdout
Configures the WASI module to inherit the STDOUT from the host
-
#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.
Class Method Detail
Instance Method Detail
Builds the state builder to produce a WasiEnvironment
. It consumes the current WasiStateBuilder
Configures a new environment variable for the WASI module
Configures a new directory to pre-open with a different name exposed to the WASI module.
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.