Struct wasmer_wasi_asml_fork::WasiState [−][src]
Expand description
Top level data type containing all* the state with which WASI can interact.
- The contents of files are not stored and may be modified by other, concurrently running programs. Data such as the contents of directories are lazily loaded.
Usage:
WasiState::new("program_name")
.env(b"HOME", "/home/home".to_string())
.arg("--help")
.envs({
let mut hm = std::collections::HashMap::new();
hm.insert("COLOR_OUTPUT", "TRUE");
hm.insert("PATH", "/usr/bin");
hm
})
.args(&["--verbose", "list"])
.preopen(|p| p.directory("src").read(true).write(true).create(true))?
.preopen(|p| p.directory(".").alias("dot").read(true))?
.build()?;
Fields
fs: WasiFs
args: Vec<Vec<u8>>
envs: Vec<Vec<u8>>
Implementations
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl !RefUnwindSafe for WasiState
impl !UnwindSafe for WasiState
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more