pub struct Runtime { /* private fields */ }
Expand description

A runtime context for wasm3 modules.

Implementations

Creates a new runtime with the given stack size in slots.

Errors

This function will error on memory allocation failure.

Parses and loads a module from bytes.

Loads a parsed module returning the module if unsuccessful.

Errors

This function will error if the module’s environment differs from the one this runtime uses.

Looks up a function by the given name in the loaded modules of this runtime. See Module::find_function for possible error cases.

Returns the raw memory of this runtime.

Safety

The returned pointer may get invalidated when wasm function objects are called due to reallocations.

Returns the raw memory of this runtime.

Safety

The returned pointer may get invalidated when wasm function objects are called due to reallocations.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.