pub struct ModuleEnvironment<'data> {
    pub module: ModuleInfo,
    pub function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
    pub data_initializers: Vec<DataInitializer<'data>>,
    pub module_translation_state: Option<ModuleTranslationState>,
}
Expand description

The result of translating via ModuleEnvironment. Function bodies are not yet translated, and data initializers have not yet been copied out of the original buffer. The function bodies will be translated by a specific compiler backend.

Fields

module: ModuleInfo

ModuleInfo information.

function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>

References to the function bodies.

data_initializers: Vec<DataInitializer<'data>>

References to the data initializers.

module_translation_state: Option<ModuleTranslationState>

The decoded Wasm types for the module.

Implementations

Allocates the environment data structures.

Translate a wasm module using this environment. This consumes the ModuleEnvironment and produces a ModuleInfoTranslation.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

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 for metadata in pointers and references to Self.

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.