Skip to content

Commit 7127757

Browse files
committed
build: Go back to the "legacy" identifier theme of svd2rust
After starting work on porting avr-hal to the new version of avr-device, I started hitting the effects of the changed identifiers in the generated API. In Rahix/avr-hal#545, commit Rahix/avr-hal@ef69e1b, I at least got to the point of getting the Arduino Uno examples to compile again. I have to say, I absolutely do not like the code churn we introduce with this. While it is probably manageable for avr-hal with team effort, that's not all: - All downstream users will have to work through the same churn of (sometimes non-trivial) identifier changes. - All current PRs in avr-hal will need to be rebased by their authors to the new style identifiers. - Legacy examples found on the web all become outdated. - Rust compiler error messages on fixing the names are quite hit-or-miss. The update strategy is not clear if you don't understand what has happened. I took a look around the ecosystem and others have also decided to stick to what svd2rust calls the "legacy" identifier theme. I am much in favor of doing the same. There is no significant advantage to doing this change now, so let's not waste huge amounts of effort on it.
1 parent f2605f4 commit 7127757

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl CodeGenerator {
269269
svd2rust_config.skip_crate_attributes = true;
270270
svd2rust_config.reexport_core_peripherals = false;
271271
svd2rust_config.reexport_interrupt = false;
272-
svd2rust_config.ident_formats = IdentFormats::default_theme();
272+
svd2rust_config.ident_formats = IdentFormats::legacy_theme();
273273

274274
let generated_stream =
275275
svd2rust::generate::device::render(&svd, &svd2rust_config, &mut String::new())

0 commit comments

Comments
 (0)