Stream: git-wasmtime

Topic: wasmtime / PR #13401 Restore `#![no_std]` support for cra...


view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 13:40):

tomaka opened PR #13401 from tomaka:nostd to bytecodealliance:main:

Hello,

Support for #![no_std] for cranelift is currently broken, and this PR attempts to fix this.

I integrated https://github.com/bytecodealliance/wasmtime/pull/12947 for the changes in the frontend crate, alongside with the changes to the CI that were requested in the PR review.

I've also removed the requirement on the std feature of cranelift-codegen, as otherwise cranelift-frontend automatically pulls in this std feature.
I did this last change a bit blindly. A quick git blame has led me to https://github.com/bytecodealliance/wasmtime/pull/7369. Unfortunately I don't know enough to know to know whether removing this std breaks anything, nor if it makes sense to leave unwind.

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 13:40):

tomaka requested cfallin for a review on PR #13401.

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 13:40):

tomaka requested wasmtime-compiler-reviewers for a review on PR #13401.

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 13:40):

tomaka requested alexcrichton for a review on PR #13401.

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 13:40):

tomaka requested wasmtime-default-reviewers for a review on PR #13401.

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 17:02):

github-actions[bot] added the label cranelift on PR #13401.

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 17:39):

:thumbs_up: alexcrichton submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 17:39):

alexcrichton added PR #13401 Restore #![no_std] support for cranelift to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 18:04):

github-merge-queue[bot] removed PR #13401 Restore #![no_std] support for cranelift from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 07:53):

tomaka updated PR #13401.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 07:55):

tomaka commented on PR #13401:

If the CI check did cargo check -p cranelift-frontend --features core, the CI would pass.

But instead of adding --features core, I think it's a better idea to just make hashbrown non-optional. This means that hashbrown will be an unused dependency when the std feature is enabled, but I don't think that this is a problem.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 07:55):

tomaka edited a comment on PR #13401:

If the CI check I've added did cargo check -p cranelift-frontend --features core, the CI would pass.

But instead of adding --features core, I think it's a better idea to just make hashbrown non-optional. This means that hashbrown will be an unused dependency when the std feature is enabled, but I don't think that this is a problem.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 07:55):

tomaka edited a comment on PR #13401:

If the CI check I've added did cargo check -p cranelift-frontend --features core, the CI would pass.

But instead of adding --features core, I think it's a better idea to just make hashbrown non-optional. This means that hashbrown will be an unused dependency when the std feature is enabled, but I personally don't see this as a problem.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 12:22):

alexcrichton added PR #13401 Restore #![no_std] support for cranelift to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 12:46):

github-merge-queue[bot] removed PR #13401 Restore #![no_std] support for cranelift from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 12:54):

tomaka updated PR #13401.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 12:56):

tomaka commented on PR #13401:

I've hopefully fixed the new CI failure :folded_hands:

The code is assuming that HashMap implements the serde traits, and with the removal of the std feature by default it turns out that it's not the case for hashbrown::HashMap, unless we also require hashbrown/serde.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 12:57):

tomaka edited a comment on PR #13401:

I've hopefully fixed the new CI failure :folded_hands: Sorry for the back and forth

The code is assuming that HashMap implements the serde traits, and with the removal of the std feature by default it turns out that it's not the case for hashbrown::HashMap, unless we also require hashbrown/serde.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 13:26):

alexcrichton added PR #13401 Restore #![no_std] support for cranelift to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 13:52):

:check: alexcrichton merged PR #13401.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 13:52):

alexcrichton removed PR #13401 Restore #![no_std] support for cranelift from the merge queue.


Last updated: Jun 01 2026 at 09:49 UTC