Struct wasmer_wasi::WasiEnv [−][src]
Expand description
The environment provided to the WASI imports.
Fields
state: Arc<Mutex<WasiState>>
Shared state of the WASI system. Manages all the data that the executing WASI program can see.
Be careful when using this in host functions that call into Wasm: if the lock is held and the Wasm calls into a host function that tries to lock this mutex, the program will deadlock.
Implementations
Get access to the underlying data.
If WasmerEnv::finish
has been called, this function will never
return None
unless the underlying data has been mutated manually.
Gets the item without checking if it’s been initialized.
Safety
WasmerEnv::finish
must have been called on this function or
this type manually initialized.
Get an ImportObject
for a specific version of WASI detected in the module.
Like import_object
but containing all the WASI versions detected in
the module.
Get the WASI state
Be careful when using this in host functions that call into Wasm: if the lock is held and the Wasm calls into a host function that tries to lock this mutex, the program will deadlock.
Trait Implementations
The function that Wasmer will call on your type to let it finish
setting up the environment with data from the Instance
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for WasiEnv
impl !UnwindSafe for WasiEnv
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more