Skip to content

wit-component-0.4.1

@alexcrichton alexcrichton tagged this 19 Jan 21:40
* Fuzz the `ComponentEncoder` type in `roundtrip-wit`

Pushing out recent WIT changes to the `wit-bindgen` project exposed a
few bugs in `ComponentEncoder` so I've chosen to get the bugs exposed
through fuzzing and then have fuzzing tell me what else I should fix.

* Add support for top-level functions in `wit-component`

Accidentally left out from the prior PR this fills in a panic and then
fills out the implementation of creating a component which has top-level
function imports.

* Better account for type size in fuzzing function signatures

The previous logic attempted to disallow large types but the fuzzer
still found shapes of input that generated too-large types for
parsing/validation. This commit instead reworks with a fuel-based
approach where fuel is discounted as soon as a recursive variant is
chosen instead of after-the-fact. This limits the size of recursive
structures since it's known ahead of time when a recursive branch cannot
be taken and fuel is already accounted for in other branch like the
error of a result.

* Change a `return` to a `continue`

Silly mistake I made in the `add_live_imports` function.

* Bump the wit-component crate to 0.4.1

* Fix an assert in decoding to work around upstream issue

This commit works around WebAssembly/component-model#151 by relaxing an
assert since it can trip today. A test is added as well which shows the
invalid-ly decoded document which comes from the component itself.
Assets 2
Loading