-
Notifications
You must be signed in to change notification settings - Fork 248
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
asm-casts: Run on no_std #307
asm-casts: Run on no_std #307
Conversation
I approved this, but we need to see what's up with that failing test (might not be caused by your change). |
It's the Looks to me like
|
The failing test is because the forked version does not have access to the repo secret needed to pass the GitHub Actions tests. I tried disabling GitHub Actions on third-party PRs but apparently I wasn't successful. Merging. |
Thanks for merging. Would it be possible to upload this to crates.io? I'm approaching the release of the new c2rust based version of riot-sys, and cargo insists all dependencies are uploaded. (The c2rust which users need to have installed depends on, basically, all the other PRs I currently have open, but that's not so bad because that dependency is outside cargo anyway as c2rust can't be a build dependency AFAIU, but the c2rust-asm-casts are a regular dependency). |
Pinging @rinon for crates.io releases. |
@rinon, is there anything left to do / where I contribute to getting this to crates.io? That dependency is currently the largest stopper to a new round of RIOT sys-/wrapper crates being published. |
@chrysn new version is published, sorry it took so long. |
I still see https://crates.io/crates/c2rust-asm-casts as being the 0.1.1 of last 2019-10-30, might something have gone wrong during the upload? |
I was dumb and missed this crate in the publish. Should be good now @chrysn |
... while immunant/c2rust#307 not published
including all the necessary workarounds See-Also: immunant/c2rust#306 See-Also: immunant/c2rust#307
There's nothing in the asm-casts crate that necessitates std (and the std::marker::PhantomData was changed to its alias core::marker::PhantomData). This PR just sets
#![no_std]
and switches over the PhantomData import.This allows code produced with asm casts to be used in no_std environments. (Admittedly, that's a bit far-fetched as there's no official support for cross-platform transpilation yet, see #305 -- but it's another stepping stone towards rust-lang/rust-bindgen#1344).
I've tested this in a practical application (it builds and runs -- but I can't tell yet whether it actually executes any place with those casts), and run the local
cargo test
which runs the crate-internal coverage combo successfully.