pub struct ModuleEnvironment<'data, 'module> { /* private fields */ }
Expand description

Object containing the standalone environment information. To be passed after creation as argument to compile_module.

Implementations§

Allocates the enironment data structures with the given isa.

Translate the given wasm module data using this environment. This consumes the ModuleEnvironment with its mutable reference to the Module and produces a ModuleTranslation with an immutable reference to the Module (which has become fully populated).

Trait Implementations§

This trait is useful for translate_module because it tells how to translate enironment-dependent wasm instructions. These functions should not be called by the user.

Get the information needed to produce Cranelift IR for the current target.
Declares a function signature to the environment.
Return the signature with the given index.
Declares a function import to the environment.
Return the number of imported funcs.
Declares the type (signature) of a local function in the module.
Return the signature index for the given function index.
Declares a global import to the environment.
Declares a global to the environment.
Return the global for the given global index.
Declares a table import to the environment.
Declares a table to the environment.
Fills a declared table with references to functions in the module.
Declares a memory import to the environment.
Declares a memory to the environment
Fills a declared memory with bytes at module instantiation.
Declares a function export to the environment.
Declares a table export to the environment.
Declares a memory export to the environment.
Declares a global export to the environment.
Declares a start function.
Provides the contents of a function body.

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.