Skip to content

Add defmt support#216

Merged
Lokathor merged 1 commit intoLokathor:mainfrom
wojciech-graj:defmt
Mar 14, 2026
Merged

Add defmt support#216
Lokathor merged 1 commit intoLokathor:mainfrom
wojciech-graj:defmt

Conversation

@wojciech-graj
Copy link
Contributor

@wojciech-graj wojciech-graj commented Feb 18, 2026

All of the formatting mirrors the Debug impls, since they are logically the same.

LTO has to be enabled because the windows linker tries to resolve symbols before performing dead code elimination, and defmt requires additional crates to actually "work" in a binary.

The MSRV also has to be bumped to 1.60, because cargo checks the Cargo.toml files of all dependencies, even if they're optional and disabled, and the syntax was expanded with version 1.60. These new syntax features are used by proc-macro-error2, which is a dependency of defmt.

@wojciech-graj wojciech-graj force-pushed the defmt branch 3 times, most recently from 12c05a3 to cf66d10 Compare February 18, 2026 20:25
@Lokathor
Copy link
Owner

does the LTO requirement affect downstream users of the crate? that would be rather troublesome if so.

@wojciech-graj
Copy link
Contributor Author

does the LTO requirement affect downstream users of the crate? that would be rather troublesome if so.

It would only affect them when enabling the defmt feature, which they'd only use for embedded targets for which all of these symbols would be defined.

@Lokathor Lokathor merged commit 01b7a9f into Lokathor:main Mar 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants