Features to support optional defmt for the byteorder types

Open Beginner friendly
#3,914 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@korken89 is already working on this.

Since Nov 18, 2026.

  • #3928 by @korken89 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
backend

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

customer-request

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/zerocopy

All issues in google/zerocopy

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.