wit_component::metadata

Function encode

Source
pub fn encode(
    resolve: &Resolve,
    world: WorldId,
    string_encoding: StringEncoding,
    extra_producers: Option<&Producers>,
) -> Result<Vec<u8>>
Expand description

Creates a component-type* custom section to be decoded by decode above.

This is primarily created by wit-bindgen-based guest generators to embed into the final core wasm binary. The core wasm binary is later fed through wit-component to produce the actual component where this returned section will be decoded.