Skip to content

0.8.0

Compare
Choose a tag to compare
@wrenger wrenger released this 20 Jun 10:19
· 16 commits to main since this release

This release adds support for auto-generating the defmt::Format trait (#42):

#[bitfield(u64, defmt = true)]
struct DefmtExample {
    data: u64
}
defmt::println!("{}", DefmtExample::new());

Thanks to @agrif for implementing this.

Also, the auto-trait implementations (Default, Debug, defmt::Format) now support cfg(...) attributes:

#[bitfield(u64, debug = cfg(test), default = cfg(feature = "foo"))]
struct CustomDebug {
    data: u64
}

These cfg attributes are added to the trait implementations, only enabling them if the conditions are met.