Features to support optional defmt for the byteorder types
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start by locating the byteorder type definitions and their existing feature-gated trait implementations. Check how optional dependencies and feature flags are declared, then follow the suggested defmt::Format implementation pattern for these types. Done when the defmt feature enables formatting for byteorder types and the crate’s relevant checks pass.
Written by the indexing model from the issue text.
Description
What is the name of your project?
Not a single project, this is for the embedded Rust ecosystem in general (I'm one of the RTIC maintainers).
Please provide a link to your project (GitHub repository, crates.io page, etc).
https://github.com/rtic-rs/rtic
What features would you like from zerocopy?
defmt::Format for the byteorder types, behind an optional defmt feature.
defmt is the standard logging framework on embedded Rust, and most crates used on target have a defmt feature. Today a struct with a U32<LE> field can't derive defmt::Format, so everyone writes their own wrappers.
The impl:
#[cfg(feature = "defmt")]
impl<O: ByteOrder> defmt::Format for $name<O> {
#[inline]
fn format(&self, f: defmt::Formatter<'_>) {
defmt::Format::format(&self.get(), f)
}
}
Would you be open to a defmt feature here?
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 194
- Avg merge
- 18h 15m
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/zerocopy
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
google/zerocopy#3766 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/zerocopy#3495 · 8 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swc-project/swc-next-issues#533 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eandualem/agent-interface#290 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day