Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WIT tooling used by Wasmtime #5565

Merged
merged 5 commits into from
Jan 18, 2023

Conversation

alexcrichton
Copy link
Member

This commit updates the WIT tooling, namely the wasm-tools family of crates, with recent updates. Notably:

This updates index spaces in components and additionally bumps the minimum required version of the component binary format to be consumed by Wasmtime (because of the index space changes). Additionally WIT tooling now fully supports use.

Note that WIT tooling doesn't, at this time, fully support packages and depending on remotely defined WIT packages. Currently WIT still needs to be vendored in the project. It's hoped that future work with cargo component and possible integration here could make the story about depending on remotely-defined WIT more ergonomic and streamlined.

This commit updates the WIT tooling, namely the wasm-tools family of
crates, with recent updates. Notably:

* bytecodealliance/wasm-tools#867
* bytecodealliance/wasm-tools#871

This updates index spaces in components and additionally bumps the
minimum required version of the component binary format to be consumed
by Wasmtime (because of the index space changes). Additionally WIT
tooling now fully supports `use`.

Note that WIT tooling doesn't, at this time, fully support packages and
depending on remotely defined WIT packages. Currently WIT still needs to
be vendored in the project. It's hoped that future work with `cargo
component` and possible integration here could make the story about
depending on remotely-defined WIT more ergonomic and streamlined.
@alexcrichton
Copy link
Member Author

Note that this is additionally a draft PR while bytecodealliance/wasm-tools#867 has not landed or been published yet to crates.io.

I'll also note that I took some time to write up documentation for the bindgen! macro since previously there was none. It doesn't go too too deeply into the usage but it hopefully is enough to get intrepid newcomers off the ground.

@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jan 12, 2023
@github-actions
Copy link

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton marked this pull request as ready for review January 17, 2023 21:15
crates/component-macro/tests/codegen.rs Outdated Show resolved Hide resolved
@alexcrichton alexcrichton enabled auto-merge (squash) January 18, 2023 15:03
@alexcrichton alexcrichton merged commit 2478512 into bytecodealliance:main Jan 18, 2023
@alexcrichton alexcrichton deleted the update-wasm-tools branch January 18, 2023 15:37
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Jan 18, 2023
This commit fixes more cases from bytecodealliance#5565 where `export` items introducing
indices wasn't handled by accident. Additionally this fixes support for
aliasing types from instances which largely wasn't working before. Most
of the fixes here are about correctly maintaining Wasmtime's view of the
type index spaces.
alexcrichton added a commit that referenced this pull request Jan 19, 2023
This commit fixes more cases from #5565 where `export` items introducing
indices wasn't handled by accident. Additionally this fixes support for
aliasing types from instances which largely wasn't working before. Most
of the fixes here are about correctly maintaining Wasmtime's view of the
type index spaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants