Skip to content

Conversation

@the-ssd
Copy link
Contributor

@the-ssd the-ssd commented Jan 1, 2026

Part of #12222, slightly refactored. Related to #1158.

Adds support for no_std compilation of cranelift-assmebler-x64. Required for cranelift-codegen to support no_std compilation.

@the-ssd the-ssd requested review from a team as code owners January 1, 2026 21:05
@the-ssd the-ssd requested review from fitzgen and removed request for a team January 1, 2026 21:05
@the-ssd the-ssd force-pushed the cranelift-nostd-assembler branch from 5f1c040 to 0502ab1 Compare January 1, 2026 21:05
@the-ssd
Copy link
Contributor Author

the-ssd commented Jan 1, 2026

I guess the CI is running cargo test with all features, should I change core feature to std, or can you help me fix the CI?

@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Jan 2, 2026
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@alexcrichton alexcrichton added this pull request to the merge queue Jan 5, 2026
Merged via the queue into bytecodealliance:main with commit 63330f1 Jan 5, 2026
45 checks passed
@the-ssd the-ssd deleted the cranelift-nostd-assembler branch January 5, 2026 16:14
@the-ssd
Copy link
Contributor Author

the-ssd commented Jan 5, 2026

@alexcrichton Thank you too! This is almost everything needed for #12222. I still am not sure if the way I deal with OnceLock is good enough to be merged (because it just recomputes MachineEnv each time). And some architectures use powi which libm doesn't have (only x86 and arm compile with no_std).

@alexcrichton
Copy link
Member

Want to rebase that PR after the recent merges and we can brainstorm over there? Should in theory be a bit easier to think about with a smaller diff

@the-ssd
Copy link
Contributor Author

the-ssd commented Jan 5, 2026

@alexcrichton I have already rebased it, a lot of it is are one line changes like adding prelude, fixing hashmap import (also FxHashMap on no_std now works). Really the only thing is OnceLock. I removed it, but now it's recomputed each time. I can try to find a no_std replacement or move some stuff around in order to use sync_nostd.rs like suggested in the old PR.

Also I accidentally formated Cargo.toml, so maybe I should revert it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants