wit_parser::decoding

Function decode

source
pub fn decode(bytes: &[u8]) -> Result<DecodedWasm>
Expand description

Decodes an in-memory WebAssembly binary into a WIT Resolve and associated metadata.

The WebAssembly binary provided here can either be a WIT-package-encoded-as-binary or an actual component itself. A Resolve is always created and the return value indicates which was detected.