pub fn decode_world(name: &str, bytes: &[u8]) -> Result<World>
Expand description

Decode the world described by the given component bytes.

This function takes a binary component as input and will infer the World representation of its imports and exports. The binary component at this time is either a “types only” component produced by wit-component or an actual output of wit-component.

The returned world represents the description of imports and exports from the component.

This can fail if the input component is invalid or otherwise isn’t of the expected shape. At this time not all component shapes are supported here.