Skip to main content

create_from_component

Function create_from_component 

Source
pub fn create_from_component(
    component: &[u8],
    patterns: &[&str],
) -> Result<Vec<u8>>
Expand description

Create an interceptor component from an existing component binary.

Extracts the world from the component’s embedded WIT, then creates an interceptor for its exports.

  • component: a valid wasm component binary
  • patterns: match patterns for selective interception (empty = intercept all)

Returns the validated component bytes.