alexcrichton requested wasmtime-core-reviewers for a review on PR #8485.
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 tono_std
. This PR disables the default feature ofwasmparser
by default and additionally does the same forserde
. This enables them to compile inno_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 manualDisplay
implementation with a cfg'd implementation ofError
.As before CI checks are added for
wasmtime-types
with ano_std
target itself to ensure the crate and all dependencies all avoidstd
.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #8485.
alexcrichton requested wasmtime-default-reviewers for a review on PR #8485.
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 tono_std
. This PR disables the default feature ofwasmparser
by default and additionally does the same forserde
. This enables them to compile inno_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 manualDisplay
implementation with a cfg'd implementation ofError
.As before CI checks are added for
wasmtime-types
with ano_std
target itself to ensure the crate and all dependencies all avoidstd
.cc #8341
abrown submitted PR review.
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 inalloc
with thestd
version instead?
alexcrichton submitted PR review.
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
abrown submitted PR review.
abrown created PR review comment:
Got it, thanks!
abrown submitted PR review.
@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 updated PR #8485.
alexcrichton has enabled auto merge for PR #8485.
alexcrichton merged PR #8485.
Last updated: Nov 22 2024 at 16:03 UTC