Struct wasm_encoder::StartSection [−][src]
pub struct StartSection {
pub function_index: u32,
}Expand description
An encoder for the start section.
Example
Note: this doesn’t actually define the function at index 0, its type, or its
code body, so the resulting Wasm module will be invalid. See TypeSection,
FunctionSection, and CodeSection for details on how to generate those
things.
use wasm_encoder::{Module, StartSection}; let start = StartSection { function_index: 0 }; let mut module = Module::new(); module.section(&start); let wasm_bytes = module.finish();
Fields
function_index: u32The index of the start function.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StartSectionimpl Send for StartSectionimpl Sync for StartSectionimpl Unpin for StartSectionimpl UnwindSafe for StartSectionBlanket Implementations
Mutably borrows from an owned value. Read more