Various attributes and extern "C" must be marked "unsafe" to compile generated code
This is due to edition change, use 2021 edition in Cargo.toml to resolve. I remember an issue where we discussed how to solve this but I can't find it anymore
but I can't find it anymore
https://github.com/rust-embedded/svd2rust/pull/891
1.82.0 Released on: 17 October, 2024
@therealprof What do you think? Should we bump rust to 1.82 and fix this or stay on edition 2021?
Should we bump rust to 1.82 and fix this or stay on
edition 2021
Edition 2024 needs rust 1.85.
@therealprof What do you think? Should we bump rust to 1.82 and fix this or stay on
edition 2021?
As discussed in our weekly meeting just now, we see very little upside in bumping to edition 2024 at this time and some major downsides, like not being able to build the generated PACs with Ferrocene for the time being. Since crates can be build with different editions there doesn't seem to be an obvious reason to make the jump now.
It would be good to know if we missed something important. @Plaba
Ok. Another suggestion. Support 2 rust versions.
What do you think about support by default last stable version of Rust?
But also add ~--rust-1.76~ option (or just --msrv) which allows to generate code acceptable by old compilers?
@burrbull We did discuss adding a --edition=2024 flag to svd2rust (with some earlier Rust version as default); also adding cfg(edition="2024") flags to the generated code. The consensus was that things are working OK as-is as far as we know, so we chose not to put in the work yet.