Struct wasmtime_environ::ModuleTranslation[][src]

pub struct ModuleTranslation<'data> {
    pub module: Module,
    pub function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
    pub escaped_funcs: HashSet<DefinedFuncIndex>,
    pub exported_signatures: Vec<SignatureIndex>,
    pub debuginfo: DebugInfoData<'data>,
    pub has_unparsed_debuginfo: bool,
    pub data: Vec<Cow<'data, [u8]>>,
    pub passive_data: Vec<&'data [u8]>,
    // some fields omitted
}
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.

Fields

module: Module

Module information.

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

References to the function bodies.

escaped_funcs: HashSet<DefinedFuncIndex>

The set of defined functions within this module which are “possibly exported” which means that the host can possibly call them. This includes functions such as:

  • Exported functions
  • Functions in element segments
  • Functions via ref.func instructions

This set is used to determine the set of type signatures that need trampolines for the host to call into.

exported_signatures: Vec<SignatureIndex>

A list of type signatures which are considered exported from this module, or those that can possibly be called. This list is sorted, and trampolines for each of these signatures are required.

debuginfo: DebugInfoData<'data>

DWARF debug information, if enabled, parsed from the module.

has_unparsed_debuginfo: bool

Set if debuginfo was found but it was not parsed due to Tunables configuration.

data: Vec<Cow<'data, [u8]>>

List of data segments found in this module which should be concatenated together for the final compiled artifact.

These data segments, when concatenated, are indexed by the MemoryInitializer type.

passive_data: Vec<&'data [u8]>

List of passive element segments found in this module which will get concatenated for the final artifact.

Implementations

Attempts to convert segmented memory initialization into paged initialization for the module that this translation represents.

If this module’s memory initialization is not compatible with paged initialization then this won’t change anything. Otherwise if it is compatible then the memory_initialization field will be updated.

Trait Implementations

Returns the “default value” for a 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

Performs the conversion.

Performs the conversion.

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.