Skip to main content

Module compiler

Module compiler 

Source

Modules§

special

Structs§

Compiler

Enums§

CompileMode
Selects which export shape the compiler emits.

Constants§

PROLOGUE_DONE_EXPORT
The export name of the flag the instance prologue sets once every instance is allocated and filled; the host settles the heap only when it reads 1.

Functions§

global_export_name
The export name of the mutable global idx a unit allocated for a runtime global; the host reads it back after the unit runs.
instance_export_name
The export name of the global holding the session instance serial; the host reads it back to see what the unit did to the instance.
wasm_validation_features
The wasmparser feature set every module the compiler emits is checked against: GC + function-references + exceptions, on top of the defaults. The single source of truth for that set — validate_module (every Compiler::compile* call) and the codegen integration tests’ validate_wasm (tests/codegen/common.rs, which cannot see this module’s private items and so calls this pub fn instead) both route through it, rather than each keeping their own copy of the same feature list to drift apart (ADR-0034 / plan 0011 Phase 0).