-
Notifications
You must be signed in to change notification settings - Fork 307
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
frb incompatible with Rust 2024 edition #2491
Comments
Good point! The simplest way may be add a flag (e.g. "rust_edition: 2024") and generate different things according to this. A slightly more fancy way is to utilize the existing infrastructure that parses the Cargo.toml, and check what is the current edition, and do different things based on it. Feel free to PR! Alternatively I may work on it in the next batch. The workaround is to simply not upgrade to Rust 2024 edition now. |
It's already accepted by rustc 1.82, it doesn't need the 2024 edition specifically. I don't know if it would be ok to just define 1.82 as the minimum compiler version for frb. |
Hmm, but it seems to complain frb's generated code. Thus, it is the user's Cargo.toml that handles this. |
Yes, so a project that uses Rust 2024 can't use frb at the moment. If you would just change the generated code, it's still work on older editions, but would need a compiler 1.82 or later. |
Oh I see! Hmm 1.82 looks quite recent, but maybe we can do that, and if someone has strong reason to be on <1.82 he/she can either use older version of frb, or create an issue and we can do the "create a flag" thing above. Feel free to PR since it seems not very hard :) |
Describe the bug
In Rust 2024 edition, the deprecated
#[no_mangle]
attribute is now a hard error. frb's code generator still generates it though.You can read more about it here.
The text was updated successfully, but these errors were encountered: