defmt-macros
defmt macros
1.1.1
25M downloads/mo
#1876 most downloaded on crates.io
knurling-rs/defmt
What this package is like to depend on
Last release 1 months ago
03 Jul 2026
Release timing varies
gaps range from 5 weeks to 1.1 years
Nearly every release is documented
notes for 19 of 19 stable releases
3 versions withdrawn
withdrawn after publishing
6 years old
23 releases · first in 2020
2 releases in the last 12 months
see the full history below
Release timeline
23 releases · Nov 2020 to Jul 2026
2021
2022
2023
2024
2025
2026
Releases
latest 23-
1.1.103 Jul 2026Release notes
Open source →What's Changed
- Use
syn::Errorby @Hoverbear in #1070 - Release 1.1.1 by @knoellle in #1072
New Contributors
Full Changelog: defmt-v1.1.0...defmt-v1.1.1
- Use
-
1.1.012 May 2026Release notes
Open source →What's Changed
- Add bare metal ESP32-S2 to the
no_caslist by @bugadani in #955 - Update object crate to version 0.36 by @mcnicholls in #958
- add support for
#[defmt(transparent)]by @vic1707 in #937 - Modify defmt-print so it can handle 'oneline' as a log format. by @jonathanpallant in #965
- macros: Fix env_filter logic by @jamesmunns in #972
- typecheck logs disabled by filter by @de-vri-es in #974
- impl Format for core::fmt::Error by @phycrax in #1007
- Adding Format impl for core::num::Wrapping by @jmriesen in #983
- Un-qualify use of
defmtin proc macros by @jamesmunns in #1022 - feat: add bound attribute by @vic1707 in #1044
- Use general semihosting crate instead of cortex-m specific crate by @Siddhant779 in #1046
New Contributors
- @bugadani made their first contribution in #955
- @nazo6 made their first contribution in #952
- @luigix25 made their first contribution in #956
- @mcnicholls made their first contribution in #958
- @gibbz00 made their first contribution in #959
- @vic1707 made their first contribution in #937
- @de-vri-es made their first contribution in #974
- @markhakansson made their first contribution in #1004
- @aimir made their first contribution in #1003
- @phycrax made their first contribution in #1007
- @Hoverbear made their first contribution in #1009
- @Oveln made their first contribution in #1005
- @darkwater made their first contribution in #966
- @N-T-K made their first contribution in #1011
- @jmriesen made their first contribution in #983
- @knoellle made their first contribution in #1041
- @Siddhant779 made their first contribution in #1046
Full Changelog: defmt-v1.0.1...defmt-v1.1.0
Release notes
Open source →- [#974] Ensure typechecking is still performed on disabled log statement.
- [#960] Fix
Formatnot accepting multiple helper attribute instances - [#937] add support for
#[defmt(transparent)]onFormatderive - [#959] Missing "unstable-test" cfg in tests module
- [#956] Link
LICENSE-*in the crate folder - [#955] Allow using the
defmt/allocfeature on bare metal ESP32-S2 - [#972] Fix logic bug in env_filter
- [#1007]
defmt: implFormatforcore::fmt::Error - [#983] Add
Formatimplementation forcore::num::Wrapping<T> - [#1022] Re-fix accidental breaking change in
Formatmacro - [#1041] Ignore RUSTSEC-2026-0009
- [#1052] Pin UI tests to host MSRV
- Add bare metal ESP32-S2 to the
-
1.0.101 Apr 2025 -
1.0.001 Apr 2025 withdrawnRelease notes
Open source →- [#909] First 1.0 stable release :tada:
- [#938] Emit
option_env!("DEFMT_LOG")so rustc depinfo can track it - [#935] Add note in book's setup chapter to clarify staticlib setup
- [#914] Add cargo-deny as a CI action to check crate security and licensing
-
1.0.0-rc.108 Jan 2025 pre-releaseNothing published for this version
-
0.4.029 Nov 2024Release notes
Open source →- [#899] Just a major version bump to stop it being used by older defmt versions.
-
0.3.1027 Nov 2024 withdrawnRelease notes
Open source →- [#902] Minor change to Format impl for
core::panic::PanicInfo, eliding a lifetime specifier to satisfy Clippy 1.83. - [#899] Pin the defmt-macro crate to avoid incompatible versions being used together
- [#902] Minor change to Format impl for
-
0.3.914 May 2024Release notes
Open source →- [#889] Add script for book hosting
- [#887] Fix interning example in the book
- [#884] Upgrade dependencies: notify is now at v7, thiserror is now at v2
- [#883] Mark decoder and parser not as unstable anymore
- [#880] Merge function calls emitted by the macro to save space.
- [#874]
defmt: Fix doc test - [#872]
defmt: Addexpect!as alias forunwrap!for discoverability - [#871] Set MSRV to Rust 1.76
- [#869]
macros: Add missing type hints - [#865]
defmt: Replace proc-macro-error with proc-macro-error2 - [#858]
defmt: Implement "passthrough" trait impls for*2Formatwrappers - [#857] Add an octal display hint (
:o) - [#856]
defmt: Add aFormatimpl forPanicInfoand related types. - [#852]
CI: Update mdbook to v0.4.40 - [#848]
decoder: add optional one-line format - [#847]
decoder: Fix log format width specifier not working as expected - [#845]
decoder: fix println!() records being printed with formatting - [#843]
defmt: Sort IDs of log msgs by severity to allow runtime filtering by severity - [#822]
CI: Runcargo semver-checkson every PR
-
0.3.813 May 2024 withdrawnRelease notes
Open source →- [#840]
defmt: Support pre-1.77 - [#839]
CI: Fix tests - [#838]
defmt: Switch to Cargo instruction compatible with older versions of Cargo
- [#840]
-
0.3.707 Feb 2024Release notes
Open source →- [#831]
CI: Fix CI - [#830]
book: Add section about feature-gated derive Format - [#821] Clean up
- [#813] doc: add note for the alloc feature flag
- [#812]
defmt: Add a feature to stop linking a default panic handler - [#811]
book: Add some examples for byte slice/array hints as well - [#805]
defmt: Drop ip_in_core feature and re-enable nightly snapshot tests
- [#831]
-
0.3.619 Jun 2023Release notes
Open source →- [#804]
CI: Remove mdbook strategy - [#803]
CI: Disable nightly qemu-snapshot tests - [#789]
defmt: Add support for new time-related display hints
- [#804]
-
0.3.505 May 2023Release notes
Open source →- [#758]
defmt-print: Tidy up - [#757]
defmt-print: Allow reading from a tcp port - [#756]
CI: Switch from bors to merge queue - [#753]
demftAddFormatimpls forcore::ptr::NonNullandfn(Args...) -> Ret(up to 12 arguments)
- [#758]
-
0.3.429 Mar 2023 -
0.3.306 Oct 2022Release notes
Open source →- [#744]
defmt-parser: Clean and simplify - [#743]
defmt-parser: Simplify tests withrstest - [#740] Snapshot tests for
core::net - [#739]
xtask: Clean up - [#737]
panic-probe: Addhard_fault()for use indefmt::panic_handler - [#733]
defmt: Add formatting forcore::netwith theip_in_corefeature - [#603]
defmt: Raw pointers now print as0x1234instead of1234 - [#536]
defmt-parser: Switch to using an enum for errors, and add some help text pointing you to the defmt docs if you use the wrong type specifier in a format string.
- [#744]
-
0.3.210 Mar 2022 -
0.3.126 Nov 2021Release notes
Open source →Added
- [#662]
#[derive(Format)]now accepts attribute fields to format fields using theDebug2Formatadapter instead of aFormatimplementation. - [#661] Add tests for Cell types
- [#656] Implement
defmt::FormatforCellandRefCell - [#630] Add test instructions to README.md
Changed
- [#659] mark extern::acquire() and extern::release() as unsafe. this is not a breaking change; this is an internal API
- [#640] use crate critical-section in defmt-rtt
- [#634] update ELF parsing dependencies
- [#633] make RTT buffer size configurable
- [#626] Make errror message more meaningful in case of version-mismatch
- [#662]
-
0.3.010 Nov 2021Release notes
Open source →- [#618] Support #[ignore] attribute in defmt_test
- [#621] Readme Diagram: Replace duplicate defmt-itm with defmt-rtt
- [#617] Add display hint to output
u64as ISO8601 time - [#620] Tidy up: remove unused code and dependencies
- [#619] Update all crates to rust edition 2021! 🎉
- [#610]
defmt-print: Log if malformed frame gets skipped - [#547] Migration guide
v0.2.xtov0.3.0 - [#604] defmt-test:
#[cfg(test)]the#[defmt_test::tests]module - [#616] Update user guide part of the book
- [#615] Document how to deal with backward compatibility breakage
- [#614] Bugfix: decoder breaks with pipe symbol
- [#605] Properly handle the
offpseudo-level in presence of nested logging directives - [#611] Fix
cargo doc-warnings - [#608]
decoder: Fix thatdefmt::println!shows leading space when timestamps are disabled - [#601] Move crate
defmttodefmt/ - [#600] Run snapshot & backcompat tests in dev mode only
- [#519] Target-side
env_logger-like env filter - [#592] xtask: add backward compability test
- [#598]
defmt-print: Recover from decoding-errors - [#569] Add defmt
println!macro - [#580] Structure
defmt::export - [#594] panic-probe: use UDF instruction on nested panics
- [#591] Remove timestamps from snapshot test
- [#585] Add xtask option to run a single snapshot test by name
- [#589] Implement
Formatfor arrays of any length - [#587] Tweak inline attributes to remove machine code duplication
- [#574] Refactor rtt [1/2]
- [#584] Remove outdated doc "you may only call write! once"
- [#581] Add impl for
alloc::Layout - [#579] defmt-rtt: fix check for blocking RTT
- [#577] Fix typo in
cfgof encoding-feature-compile_error! - [#578]
qemu: Allow dead code - [#550] Added
defmt::flush() - [#570] Support referring to
Selfin bitflags constants - [#568] Encoding docs.
- [#564] Make order of bitflags values deterministic
- [#561] Remove unused cortex-m-rt in panic-probe a=Dirbaio
- [#562] Remove call to fill in user survey from
README - [#560] Update cortex-m-rt crate from
0.6to0.7 - [#557] Add impl for TryFromSliceError
- [#556] Add impl for TryFromIntError
- [#551] Display git version & date to introduction section
- [#540] Separate "crate version" from "wire format version
- [#545] Revert "
build.rs: Obtain version from macro; simplify" - [#539] Add optional rzCOBS encoding+framing
- [#518]
build.rs: Obtain version from macro; simplify - [#543]
CI: Temporarily drop backward-compatibility check - [#542]
snapshot-tests: Test alternate hint for bitfields - [#538] Fix wrong bit count in comment.
- [#537]
snapshot-tests: Delete:?hint without impact - [#531] refactor the
macroscrate - [#534] Attribute test progress message to the test in question;
- [#535] Don't print leading space when timestamp is absent
- [#529] Refactor user-guide of
book - [#528] Support bitflags
- [#533] Adds add for user survey into readme.
- [#527]
book: Add logo and support text to introduction - [#526]
decoder: Simplify tests - [#359] Implement precedence of inner display hint
- [#523] Minimize dependencies
- [#508] [5/n] Format trait v2
- [#522] Replace
µshint withus - [#521] [3/n] Remove u24
- [#516]
xtask: Only install additional targets for tests that require them - [#512] Add overwrite option for xtask cross results.
- [#514] extend raw pointer implementation to include !Format types
- [#513] book/duplicates.md: discriminator -> disambiguator
- [#507] [2/n] - Remove code-size-costly optimizations
- [#505] [1/n] - Logger trait v2.
-
0.2.317 Jun 2021Release notes
Open source →Added
- [#499] Illustrate structure of the defmt crates
- [#503] Add alternate hint ('#')
- [#509]
impl Format for NonZero*
Changed
- [#488] Structure
impl Formats into multiple files - [#496] Bump build-dep
semverto1.0 - [#489] Structure lib
- [#500] book: fix leftover old formatting syntax; typos
- [#510]
CI: Don't install MacOS dependency which is included by default
Fixed
- [#497]
macros: match unused vars if logging is disabled
-
0.2.201 Jun 2021Release notes
Open source →Added
- [#446] Add usage examples for
Debug2Format,Display2Format - [#464]
impl<T> Format for {*const, *mut} T where T: Format + ?Sized - [#472]
impl Format forthe core::{iter, ops, slice} structs - [#473]
impl Format forall theCows - [#478] add
dbg!macro
Changed
- [#477] Disable logging calls via conditional compilation when all defmt features are disabled
- [#446] Add usage examples for
-
0.2.121 May 2021Release notes
Open source →Added
- [#403] Add knurling logo to API docs
Fixed
- [#413] Fix docs-rs build, by disabling feature "unstable-test"
- [#427] Drop outdated note about
defmt v0.2.0from book
-
0.2.019 Feb 2021Release notes
Open source →Added
- [#284] Implement support for
i128andu128types - [#291] Allows using
defmton x86 platforms by making the test suite use an internal Cargo feature - [#293] Make
defmtattributes forward input attributes - [#294] Permits
useitems inside#[defmt_test::tests]modules - [#296] Allows skipping the
defmtversion check in order to make development easier - [#302]
derive(Format)now supports more than 256 variants - [#304] impl
Formatforchars - [#313] Add display hints
- [#323] Merge
Uxx(u64)(Ixx(i64)) andU128(u128)(u128(i128)) data variants - [#327]
impl<T> Format for PhantomData<T> - [#329] Document safety of implementation detail functions
- [#335] Add the
defmt-itmcrate - [#338] Add
defmt-loggeranddefmt-printcrates - [#343] Customizable timestamps
- [#347] Document the grammar of
defmts current format parameter syntax - [#351] Allow tools to distinguish user-controlled format strings from generated ones
- [#354] Add
f64support - [#376] Make
defmt-loggermore configurable, removeprobe-runstrings - [#377]
defmt-test: support returningResultfrom tests - [#382]
impl Format for Infallible - [#391]
impl Format for core::time::Duration
Changed
- [#297] Improves the output formatting and includes a progress indicator
- [#299] Test embedded test runner (
defmt-test) as part of our CI setup - [#300]
#[derive]now uses built-in primitive formatting for primitive references - [#303] Employ the help of [bors]
- [#305]
Formatteris now passed by value, i.e. consumed during formatting - [#308] compile-fail test new
Formattermove semantics - [#312]
strfields in structs are now treated as a native type by the encoder instead of going through theFormattrait - [#325] Update our UI tests to work with the latest stable release
- [#331] Add more compile-fail tests
- [#332] Improve
Formattrait docs - [#333] Hide
Formatter'sinnerfield - [#334] Fix dead link in parser docs
- [#337] Improve diagnostics on double
write! - [#339] Make leb64 encoding fully safe (while at the same time reducing its code footprint)
- [#340] Stream
core::fmtadapters - [#345] Reduce code size by avoiding 64-bit arithmetic in LEB encoding
- [#350]
panic-probenow usesdefmtsDisplay2Formatto log panic messages. In consequence, panic messages won't get truncated anymore. - [#355] Clarify the docs on
Write::write - [#352] Do not display full version with
--help. Thanks to [Javier-varez]! - [#354] Support
f64floating point numbers. - [#355] Clarify docs on
Write::write. - [#363] Improve test coverage on basic
defmtusage onstdrust - [#364] Split firmware code into separate workspace
- [#368]
defmt-itm: Raise compile error onarmv6m - [#369] Move
bors.tomlto.github/ - [#371] Link to git version of
defmtbook - [#372] Update
Printerssection indefmtbook - [#373] Improve information in
Cargo.toml - [#379] Make link to
defmtbook clickable - [#380] Merge crates
elf2tableandloggerintodecoder - [#383]
defmt-test: Modify attributes in place and handle#[cfg] - [#384] pin unstable path dependencies
- [#385] defmt_decoder: Skip allocation of datastructure for raw symbols of the table entries in
fn get_locations - [#386], [#392] Refactor decoder
- rename
mod loggertolog - make
fn parse_*,fn get_locations,fn decodemethods ofstruct Table - various simplifications and restructuring of internal code
- rename
- [#387] CI: bump timeout to 20 minutes
- [#389] defmt_decoder: Bump deps
objectandgimli
Fixed
- [#301] Fix the nightly builds after a
linked_list_allocatorfeature change - [#310], [#311] remove the runtime check (and matching tests) if the
write!macro was called multiple times as this can no longer happen sincewrite!now consumes theFormatterdue to [#305]. - [#321] ASCII hint (
:a) is now respected when used together with theFormattrait (=?and=[?]). - [#342] Fix a data corruption issue when using
bools inwrite! - [#357] Fix issue preventing
defmtfrom compiling on MacOS.
- [#284] Implement support for
-
0.1.126 Nov 2020Release notes
Open source →Fixed
- [#259] crates.io version of
defmtcrates no longer requiregitto be built
- [#259] crates.io version of
-
0.1.011 Nov 2020