Stream: git-wasmtime

Topic: wasmtime / PR #8485 Migrate the wasmtime-types crate to n...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 00:33):

alexcrichton requested wasmtime-core-reviewers for a review on PR #8485.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 00:33):

alexcrichton opened PR #8485 from alexcrichton:wasmtime-types-no-std to bytecodealliance:main:

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.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 00:33):

alexcrichton requested fitzgen for a review on PR #8485.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 00:33):

alexcrichton requested wasmtime-default-reviewers for a review on PR #8485.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 00:33):

alexcrichton edited PR #8485:

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

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 00:43):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 00:43):

abrown created PR review comment:

Hoping to learn about no_std here: why include this line? The crate should compile and work without it, so is it just here to shadow what gets used in alloc with the std version instead?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 12:00):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 12:00):

alexcrichton created PR review comment:

Ah this is here for the (one) explicit use of std in this crate, basically just the Error trait implementation. Without it there's no std to pull that trait from

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 14:58):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 14:58):

abrown created PR review comment:

Got it, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 14:58):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 26 2024 at 17:36):

abrown commented on PR #8485:

@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.

view this post on Zulip Wasmtime GitHub notifications bot (May 02 2024 at 06:33):

alexcrichton updated PR #8485.

view this post on Zulip Wasmtime GitHub notifications bot (May 02 2024 at 06:33):

alexcrichton has enabled auto merge for PR #8485.

view this post on Zulip Wasmtime GitHub notifications bot (May 02 2024 at 07:13):

alexcrichton merged PR #8485.


Last updated: Oct 23 2024 at 20:03 UTC