1.4.8
Whats Changed
40-45% faster decoding
This release contains a substantial rewrite of Chasm's decoder hot path. Primitive reads no longer pay the cost of binding a Result for every value, byte arrays and SourceReader inputs now share a buffered reader, and LEB128 decoding uses specialised fast paths when the input is contiguous.
In sequential corpus decoding comparisons against 1.4.7, the byte-array decode api dropped from 1.179 seconds to 0.690 seconds, a 41.5% reduction. The SourceReader api dropped from 1.247 seconds to 0.677 seconds, a 45.7% reduction.
Added Component Model decoding
Chasm can now decode WebAssembly Component Model binaries. The new component(...) embedding API accepts either a ByteArray or a SourceReader and returns a component in the same style as the existing core module API.
The new AST and decoder cover component types, imports and exports, aliases, instances, canonical definitions, starts, values, nested components, embedded core modules and custom metadata.
Added Component Model validation
Decoded components can now be passed to the existing validate(...) embedding API.
The validator handles the Component Model type system and subtyping rules, imports and exports, aliases, instantiation, nested components and core modules, canonical ABI definitions and options, resources and component values.
Both the decoder and validator pass the official Component Model test suite in it's entirety and include all the future release features like maps etc.