the-ssd edited PR #12222.
the-ssd created PR review comment:
the-ssd submitted PR review.
the-ssd edited PR review comment.
the-ssd edited PR #12222:
Closes #1158, allows for cranelift to be used in a no_std environment, like a kernel.
There is already #9007, which stalled.
And I am at a point I think it makes sense to ask someone what do you want to be done about FxHashMap and OnceLock. There are alternative crates that implement it, like this one (also has a comparison chart).
What is left to do:
- [x] isle codegen generates code that depends on no_std, solved in the previous PR (https://github.com/bytecodealliance/wasmtime/pull/9007/files#diff-0496ab91e0634653bd3d4295c7aa90e3f06b0c5f462332db0997a22f294cbf94)
- [x] separate PRs for: cranelift_assembler_x86 (#12235), moving large parts to core and alloc (#12237), and isle (#12236)
- [ ] floating point issues
- [x] FxHashMap
- [ ] OnceLock (sort of)
- [x] CI
- [ ] libm: roundeven has a typo in it's implementation https://github.com/rust-lang/compiler-builtins/pull/1053, so a hack is used, waiting for libm to be published to crates.io
the-ssd edited PR #12222:
Closes #1158, allows for cranelift to be used in a no_std environment, like a kernel.
There is already #9007, which stalled.
And I am at a point I think it makes sense to ask someone what do you want to be done about FxHashMap and OnceLock. There are alternative crates that implement it, like this one (also has a comparison chart).
What is left to do:
- [x] isle codegen generates code that depends on no_std, solved in the previous PR (https://github.com/bytecodealliance/wasmtime/pull/9007/files#diff-0496ab91e0634653bd3d4295c7aa90e3f06b0c5f462332db0997a22f294cbf94)
- [x] separate PRs for: cranelift_assembler_x86 (#12235), moving large parts to core and alloc (#12237), and isle (#12236)
- [x] FxHashMap
- [ ] floating point issues
- [ ] OnceLock (sort of)
- [x] CI
- [ ] libm: roundeven has a typo in it's implementation https://github.com/rust-lang/compiler-builtins/pull/1053, so a hack is used, waiting for libm to be published to crates.io
the-ssd edited PR #12222:
Closes #1158, allows for cranelift to be used in a no_std environment, like a kernel.
There is already #9007, which stalled.
And I am at a point I think it makes sense to ask someone what do you want to be done about FxHashMap and OnceLock. There are alternative crates that implement it, like this one (also has a comparison chart).
What is left to do:
- [x] isle codegen generates code that depends on no_std, solved in the previous PR (https://github.com/bytecodealliance/wasmtime/pull/9007/files#diff-0496ab91e0634653bd3d4295c7aa90e3f06b0c5f462332db0997a22f294cbf94)
- [x] separate PRs for: cranelift_assembler_x86 (#12235), moving large parts to core and alloc (#12237), and isle (#12236)
- [x] FxHashMap
- [ ] floating point issues
- [ ] OnceLock (sort of)
- [ ] CI
- [ ] libm: roundeven has a typo in it's implementation https://github.com/rust-lang/compiler-builtins/pull/1053, so a hack is used, waiting for libm to be published to crates.io
the-ssd edited PR #12222:
Used to close #1158, allows for cranelift to be used in a no_std environment, like a kernel.
There is already #9007, which stalled.
And I am at a point I think it makes sense to ask someone what do you want to be done about FxHashMap and OnceLock. There are alternative crates that implement it, like this one (also has a comparison chart).
What is left to do:
- [x] isle codegen generates code that depends on no_std, solved in the previous PR (https://github.com/bytecodealliance/wasmtime/pull/9007/files#diff-0496ab91e0634653bd3d4295c7aa90e3f06b0c5f462332db0997a22f294cbf94)
- [x] separate PRs for: cranelift_assembler_x86 (#12235), moving large parts to core and alloc (#12237), and isle (#12236)
- [x] FxHashMap
- [ ] floating point issues
- [ ] OnceLock (sort of)
- [ ] CI
- [ ] libm: roundeven has a typo in it's implementation https://github.com/rust-lang/compiler-builtins/pull/1053, so a hack is used, waiting for libm to be published to crates.io
alexcrichton submitted PR review.
alexcrichton created PR review comment:
As a heads up, I've sent https://github.com/bytecodealliance/regalloc2/pull/250 which would obsolete this, but this is fine to leave as-is in the meantime.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
cc @cfallin should this perhaps
continueto skip this value? Orpanic!since this should be unreachable? Or is 0 ok to leave in?
alexcrichton submitted PR review.
alexcrichton created PR review comment:
We unfortunately can't use git deps in Wasmtime for published crates, and we can't land dependencies on internal features, even if temporary, in case that ends up accidentally making its way to a release branch. Leaving as-is is ok for now, but it might be possible to do some macro/float trickery to avoid blocking on a compiler-builtins update for this
cfallin submitted PR review.
cfallin created PR review comment:
Yes, if we don't have
unwindthen we don't have the appropriate metadata to allow a native debugger to interpret frames anyway, so we shouldcontinue. I'm a bit curious how this built in a non-unwindbuild before -- or was that broken becausestdalways enabledunwind?
the-ssd submitted PR review.
the-ssd created PR review comment:
It was broken
cfallin submitted PR review.
cfallin created PR review comment:
@the-ssd Updating to
version = "0.13.4"should now pull in Alex's change.
cfallin created PR review comment:
@the-ssd OK, yep, let's do a
continuein this case.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
@the-ssd if you're willing to do a little more hacking, jameysharp's idea here is probably the best way to remove the need to cache the
MachineEnvat all (in a separate set of PRs of course). It would involve a change to RA2's API then an update to Cranelift to use statically-definedMachineEnvs. I have specific ideas on how to consume aPRegSetfor the register iterator on the RA2 side if you're interested -- I'll file an issue over there.
cfallin submitted PR review.
cfallin created PR review comment:
I wrote up bytecodealliance/regalloc2#252 for this.
the-ssd edited PR review comment.
the-ssd updated PR #12222.
the-ssd submitted PR review.
the-ssd created PR review comment:
updated
the-ssd submitted PR review.
the-ssd created PR review comment:
I've removed that feature and instead wrote this
// TODO: when libm v0.2.16 is published line below can be used instead // Self::with_float(Libm::<$float_ty>::roundeven(self.$as_float())) Self::with_float(self.$as_float().round_ties_even())
the-ssd updated PR #12222.
the-ssd updated PR #12222.
the-ssd submitted PR review.
the-ssd created PR review comment:
Can you check if I did it correctly?
It just looks a bit wrong, like there has to be a better solution
alexcrichton updated PR #12222.
alexcrichton created PR review comment:
Looks good to me!
alexcrichton submitted PR review.
alexcrichton has enabled auto merge for PR #12222.
alexcrichton merged PR #12222.
Last updated: Jan 09 2026 at 13:15 UTC