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

Migrate the wasmtime-types crate to no_std #8485

Merged

Conversation

alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Apr 26, 2024

This commit is where no_std for Wasmtime starts to get a bit interesting. Specifically the wasmtime-types crate is the first crate that depends on some nontrivial crates that also need to be migrated to no_std. This PR disables the default feature of wasmparser by default and additionally does the same for serde. This enables them to compile in no_std contexts by default and default features will be enabled elsewhere in this repository as necessary.

This also opts to drop the thiserror dependency entirely in favor of a manual Display implementation with a cfg'd implementation of Error.

As before CI checks are added for wasmtime-types with a no_std target itself to ensure the crate and all dependencies all avoid std.

cc #8341

This commit is where no_std for Wasmtime starts to get a bit
interesting. Specifically the `wasmtime-types` crate is the first crate
that depends on some nontrivial crates that also need to be migrated to
`no_std`. This PR disables the default feature of `wasmparser` by
default and additionally does the same for `serde`. This enables them to
compile in `no_std` contexts by default and default features will be
enabled elsewhere in this repository as necessary.

This also opts to drop the `thiserror` dependency entirely in favor of a
manual `Display` implementation with a cfg'd implementation of `Error`.

As before CI checks are added for `wasmtime-types` with a `no_std`
target itself to ensure the crate and all dependencies all avoid `std`.
@alexcrichton alexcrichton requested review from a team as code owners April 26, 2024 00:33
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team April 26, 2024 00:33
@abrown abrown added this pull request to the merge queue Apr 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 26, 2024
@abrown abrown added this pull request to the merge queue Apr 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 26, 2024
@abrown
Copy link
Collaborator

abrown commented Apr 26, 2024

@alexcrichton, looks like we need to enable std for the component adapter: https://github.com/bytecodealliance/wasmtime/actions/runs/8851805718/job/24309173297#step:6:130.

@alexcrichton alexcrichton added this pull request to the merge queue May 2, 2024
Merged via the queue into bytecodealliance:main with commit d911f4b May 2, 2024
21 checks passed
@alexcrichton alexcrichton deleted the wasmtime-types-no-std branch May 2, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants