#knurling #logging #logger #formatting #formatter

sys no-std defmt

A highly efficient logging framework that targets resource-constrained devices, like microcontrollers

10 unstable releases (3 breaking)

Uses new Rust 2021

0.3.0 Nov 10, 2021
0.2.3 Jun 17, 2021
0.2.2 May 21, 2021
0.2.1 Mar 8, 2021
0.0.0 Aug 14, 2020

#155 in Embedded development

Download history 4212/week @ 2021-10-08 3453/week @ 2021-10-15 3380/week @ 2021-10-22 4671/week @ 2021-10-29 3057/week @ 2021-11-05 3175/week @ 2021-11-12 1787/week @ 2021-11-19 1444/week @ 2021-11-26 2230/week @ 2021-12-03 1675/week @ 2021-12-10 1169/week @ 2021-12-17 904/week @ 2021-12-24 1276/week @ 2021-12-31 1469/week @ 2022-01-07 1805/week @ 2022-01-14 2335/week @ 2022-01-21

7,045 downloads per month
Used in 69 crates (49 directly)

MIT/Apache

70KB
1.5K SLoC

defmt

defmt ("de format", short for "deferred formatting") is a highly efficient logging framework that targets resource-constrained devices, like microcontrollers.

For more details about the framework check the book at https://defmt.ferrous-systems.com.

The git version of the defmt book can be viewed at https://defmt-next.ferrous-systems.com/.

Setup

New project

The fastest way to get started with defmt is to use our app-template to set up a new Cortex-M embedded project.

Existing project

To include defmt in your existing project, follow our Application Setup guide.

MSRV

defmt always compiles on the latest stable rust release. This is enforced by our CI building and testing against this version.

It still might work on older rust versions, but this isn't ensured.

defmt ecosystem

The following diagram illustrates the user-facing and internal crates of the defmt framework.

defmt crates structure

Support

defmt is part of the Knurling project, Ferrous Systems' effort at improving tooling used to develop for embedded systems.

If you think that our work is useful, consider sponsoring it via GitHub Sponsors.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

Dependencies

~0.4–0.8MB
~20K SLoC