Function wit_component::metadata::encode
source · pub fn encode(
resolve: &Resolve,
world: WorldId,
string_encoding: StringEncoding,
extra_producers: Option<&Producers>,
use_next_encoding: Option<bool>
) -> 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.