Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cranelift: no_std builds fail. #8696

Closed
Lucky4Luuk opened this issue May 27, 2024 · 4 comments
Closed

Cranelift: no_std builds fail. #8696

Lucky4Luuk opened this issue May 27, 2024 · 4 comments
Labels
bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator

Comments

@Lucky4Luuk
Copy link

Steps to Reproduce

  • Add cranelift-codegen = { version = "0.108.1", default-features = false, features = ["core"] } to project dependencies.
  • Attempt to compile for a no_std target.
  • That's it.

Expected Results

Library compiles and is usable.

Actual Results

Long list of errors output while compiling, due to a dependency on arbitrary in cranelift-control. This library relies on the std.

Versions and Environment

Cranelift version: 0.108.1

Operating system: Windows 10 x64.

Architecture: x86_64-unknown-none

@Lucky4Luuk Lucky4Luuk added bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator labels May 27, 2024
@bjorn3
Copy link
Contributor

bjorn3 commented May 27, 2024

Cranelift can't be compiled for no_std yet. Getting it working with no_std is tracked by #1158.

@Lucky4Luuk
Copy link
Author

Lucky4Luuk commented May 27, 2024

Then why is it marked as no_std compatible on crates.io?

@bjorn3
Copy link
Contributor

bjorn3 commented May 27, 2024

A couple of years ago it supported no_std, but as it wasn't being tested in CI, support for it broke. For a long while it wasn't fixed as the maintenance burden of no_std support was perceived to be too high. Only very recently has it been decided to add support for it back, but this hasn't been finished yet.

@Lucky4Luuk
Copy link
Author

IMO it is worth taking off the tag from crates.io, just to avoid further questions like this in the future, until it actually supports no_std again. But thank you for the replies, I'll read through the thread and see if I can contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

No branches or pull requests

2 participants