-
Notifications
You must be signed in to change notification settings - Fork 38
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
Update to Rust Edition 2024 #205
Comments
Not sure if this is a local issue, but after changing edition to 2024, a number of the string conversion functions (panic, logging, and some furi string methods) fail to compile due to expecting a u8 pointer but instead receiving i8 pointers.
this seems to be caused by the return value of |
Thanks for opening this issue, so we can track what would be needed to switch to 2024 edition. As you point out, it looks like the currently generated aren't compatible with the new edition. These are generated by bindgen, so we probably need to first wait for bindgen support for the 2024 edition.
It looks like the unsafe attributes are supported in all editions of Rust from 1.82.0 forward. We currently have the Rust version set to 1.81.0, but I have no problem with us updating that to a newer version (and more recent nightly than 2024-09-10). I think a good first step would be to enable the [lints.rust]
rust_2024_compatibility = "warn" We probably won't get them fixed before I cut the 0.14.0 release, but I think it would be a good thing to work on once that's out the door. |
This is landing soon, and it'd maybe be nice to update. Not sure what effect updating would have on the msrv, but the 2024 edition does come with a few nice features for embedded code and FFI (in particular, declaring functions in
unsafe extern
blocks assafe
).I've tried doing this update locally and found a few minor issues that were easily fixed;
gen
is now a reserved keyword, and so a few of the bindings need escaping.unsafe_op_in_unsafe_block
lint is now a warning by default; this is pretty easily solved, but may just warrant the lint being disabled.Would be interested to hear your thoughts on updating to this new edition. I've got a local branch that I could raise a draft PR for if that would be helpful.
The text was updated successfully, but these errors were encountered: