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 the wasm-tools family of crates, disallow empty component types #6777

Merged
merged 5 commits into from
Jul 26, 2023

Conversation

alexcrichton
Copy link
Member

This commit updates the wasm-tools family of crates which notably brings in a change to disallow empty types in the component model. There were a number of tests and fuzz-related things to update, but the "main" change here is that the stream-error type in WASI is growing a dummy: u32 field as a simple way to keep things compiling. This'll also hopefully emphasize that this is a transitionary state where it'll get updated in the future to be a non-empty type.

These files aren't actually read by anything currently. They were added
historically and a previous refactoring in bytecodealliance#6390 forgot to remove them.
No tests or build process reads them so this deletes them to get them
out of the way.
This commit updates the deps on the wasm-tools family of crates to bring
in a few fixes for WIT/component-related things. Primarily though this
brings in an update to the component model where empty types are now
disallowed.

Some tests using empty types were adjusted to use non-empty types, but
many tests were also simply removed as they existed to test what would
happen with empty types which now no longer needs to be tested.
Add a `dummy` field to make it a non-empty structure. It's expected that
this will change to something else more "official" in the future, but
for now this is here to keep everything compiling.
Empty types are no longer valid
@alexcrichton alexcrichton requested review from a team as code owners July 26, 2023 15:48
@alexcrichton alexcrichton requested review from pchickey and removed request for a team July 26, 2023 15:48
@github-actions github-actions bot added wasi Issues pertaining to WASI wasmtime:api Related to the API of the `wasmtime` crate itself labels Jul 26, 2023
@github-actions
Copy link

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasi", "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.

Copy link
Collaborator

@pchickey pchickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had never noticed that dead wit code, thanks

@peterhuene
Copy link
Member

Looks like Pat beat me to the review after all 😅 ; I was going to sneak in a review quickly so we can get this merged as the WASI adapters no longer validate with the latest wasm-tools, preventing me from bumping the deps for cargo-component.

Co-authored-by: Peter Huene <peter@huene.dev>
auto-merge was automatically disabled July 26, 2023 18:55

Pull request was closed

@alexcrichton alexcrichton reopened this Jul 26, 2023
@alexcrichton alexcrichton added this pull request to the merge queue Jul 26, 2023
Merged via the queue into bytecodealliance:main with commit 7b9189b Jul 26, 2023
19 checks passed
@alexcrichton alexcrichton deleted the update-wasm-tools branch July 26, 2023 20:02
geekbeast pushed a commit to geekbeast/wasmtime that referenced this pull request Aug 1, 2023
* main: (47 commits)
  Add core dump support to the runtime (bytecodealliance#6513)
  Resource table tracks child relationships (bytecodealliance#6779)
  Wasmtime: Move `OnDemandInstanceAllocator` to its own module (bytecodealliance#6790)
  wasi: Test the stdio streams implementation (bytecodealliance#6764)
  Don't generate same-named imports in fact modules (bytecodealliance#6783)
  Wasmtime: Add support for Wasm tail calls (bytecodealliance#6774)
  Cranelift: Fix `ABIMachineSpec::gen_add_imm` for riscv64 (bytecodealliance#6780)
  Update the wasm-tools family of crates, disallow empty component types (bytecodealliance#6777)
  Fix broken link to WASI API documentation (bytecodealliance#6775)
  A bunch of cleanups for cranelift-codegen-meta (bytecodealliance#6772)
  Implement component-to-component calls with resources (bytecodealliance#6769)
  Ignore async_stack_size if async_support is disabled (bytecodealliance#6771)
  A bunch of minor cleanups (bytecodealliance#6767)
  Fix flaky tests in preview2 streams (bytecodealliance#6763)
  Refactor and simplify component trampolines (bytecodealliance#6751)
  Cranelift: Implement tail calls on riscv64 (bytecodealliance#6749)
  WASI Preview 2: rewrite streams and pollable implementation (bytecodealliance#6556)
  cranelift-wasm: Add support for translating Wasm tail calls to CLIF (bytecodealliance#6760)
  Cranelift: Get tail calls working on aarch64 (bytecodealliance#6723)
  Implement component model resources in Wasmtime (bytecodealliance#6691)
  ...
eduardomourar pushed a commit to eduardomourar/wasmtime that referenced this pull request Aug 18, 2023
bytecodealliance#6777)

* Remove unused WIT files from Wasmtime

These files aren't actually read by anything currently. They were added
historically and a previous refactoring in bytecodealliance#6390 forgot to remove them.
No tests or build process reads them so this deletes them to get them
out of the way.

* Update dependencies on wasm-tools crates.

This commit updates the deps on the wasm-tools family of crates to bring
in a few fixes for WIT/component-related things. Primarily though this
brings in an update to the component model where empty types are now
disallowed.

Some tests using empty types were adjusted to use non-empty types, but
many tests were also simply removed as they existed to test what would
happen with empty types which now no longer needs to be tested.

* Update `stream-error` in preview2

Add a `dummy` field to make it a non-empty structure. It's expected that
this will change to something else more "official" in the future, but
for now this is here to keep everything compiling.

* Update component fuzzing to avoid empty types

Empty types are no longer valid

* Update crates/wasi/wit/deps/io/streams.wit

Co-authored-by: Peter Huene <peter@huene.dev>

---------

Co-authored-by: Peter Huene <peter@huene.dev>
rvolosatovs pushed a commit to rvolosatovs/wasi-io that referenced this pull request Aug 24, 2023
bytecodealliance/wasmtime#6777)

* Remove unused WIT files from Wasmtime

These files aren't actually read by anything currently. They were added
historically and a previous refactoring in #6390 forgot to remove them.
No tests or build process reads them so this deletes them to get them
out of the way.

* Update dependencies on wasm-tools crates.

This commit updates the deps on the wasm-tools family of crates to bring
in a few fixes for WIT/component-related things. Primarily though this
brings in an update to the component model where empty types are now
disallowed.

Some tests using empty types were adjusted to use non-empty types, but
many tests were also simply removed as they existed to test what would
happen with empty types which now no longer needs to be tested.

* Update `stream-error` in preview2

Add a `dummy` field to make it a non-empty structure. It's expected that
this will change to something else more "official" in the future, but
for now this is here to keep everything compiling.

* Update component fuzzing to avoid empty types

Empty types are no longer valid

* Update crates/wasi/wit/deps/io/streams.wit

Co-authored-by: Peter Huene <peter@huene.dev>

---------

Co-authored-by: Peter Huene <peter@huene.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasi Issues pertaining to WASI wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants