alexcrichton opened PR #4715 from upgrade-wasm-tools
to main
:
This commit pulls in the latest versions of all of the
wasm-tools
family of crates. There were two major changes that happened in
wasm-tools
in the meantime:
https://github.com/bytecodealliance/wasm-tools/pull/697 - this commit introduced a new API for
more efficiently reading binary operators from a wasm binary. The old
Operator
-based reading was left in place, however, and continues to
be what Wasmtime uses. I hope to update Wasmtime in a future PR to use
this new API, but for now the biggest change is...https://github.com/bytecodealliance/wasm-tools/pull/703 - this commit was a major update to
the component model AST. This commit almost entirely deals with the
fallout of this change.The changes made to the component model were:
The
unit
type no longer exists. This was generally a simple change
where theUnit
case in a few different locations were all removed.The
expected
type was renamed toresult
. This similarly was
relatively lightweight and mostly just a renaming on the surface. I
took this opportunity to renameval::Result
toval::ResultVal
and
types::Result
totypes::ResultType
to avoid clashing with the
standard library types. TheOption
-based types were handled with
this as well.The payload type of
variant
andresult
types are now optional.
This affected many locations that calculate flat type
representations, ABI information, etc. The#[derive(ComponentType)]
macro now specifically handles Rust-definedenum
types which have
no payload to the equivalent in the component model.Functions can now return multiple parameters. This changed the
signature of invoking component functions because the return value is
now bound byComponentNamedList
(renamed fromComponentParams
).
This had a large effect in the tests, fuzz test case generation, etc.Function types with 2-or-more parameters/results must uniquely name
all parameters/results. This mostly affected the text format used
throughout the tests.I haven't added specifically new tests for multi-return but I changed a
number of tests to use it. Additionally I've updated the fuzzers to all
exercise multi-return as well so I think we should get some good
coverage with that.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
This change is not related to this PR on the surface, but it fixes a compile error on nightly Rust which will be required to get fuzzing back online.
alexcrichton created PR review comment:
(and it's also not useful to land this independently because we also need to update
wasm-mutate
which needs an update towasmparser
which needs ...)
alexcrichton submitted PR review.
alexcrichton updated PR #4715 from upgrade-wasm-tools
to main
.
alexcrichton updated PR #4715 from upgrade-wasm-tools
to main
.
alexcrichton updated PR #4715 from upgrade-wasm-tools
to main
.
alexcrichton has marked PR #4715 as ready for review.
alexcrichton requested fitzgen for a review on PR #4715.
alexcrichton requested peterhuene for a review on PR #4715.
fitzgen submitted PR review.
alexcrichton updated PR #4715 from upgrade-wasm-tools
to main
.
alexcrichton has enabled auto merge for PR #4715.
alexcrichton updated PR #4715 from upgrade-wasm-tools
to main
.
alexcrichton updated PR #4715 from upgrade-wasm-tools
to main
.
alexcrichton merged PR #4715.
Last updated: Nov 22 2024 at 17:03 UTC