RepositoryRust
KN

knurling-rs/defmt

Efficient, deferred formatting for logging on embedded systems

1.3kstars
141forks
108issues
2views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: ferrous-systems

#1 Repository of the week

1
TINIX TRENDING·Topic: embedded-systems

#1 Repository of the week

1
TINIX TRENDING·Topic: rust-tools

#1 Repository of the week

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.

Components

This repository contains the following packages:

NamePathDescription
defmt./defmtOn-target code for highly efficient logging
defmt-macros./macrosProc Macros for defmt
defmt-print./printCLI utility for decoding and printing defmt encoded logs to standard out
defmt-decoder./decoderHost Library for decoding defmt log frames
defmt-parser./parserHost Library for parsing defmt log frames
defmt-rtt./firmware/defmt-rttOn-target library for sending defmt logs over RTT
defmt-itm./firmware/defmt-itmOn-target library for sending defmt logs over ITM
defmt-semihosting./firmware/defmt-semihostingOn-target library for sending defmt logs over semihosting
panic-probe./firmware/panic-probeOn-target library for sending panic! over defmt
defmt-test./firmware/defmt-testFramework for running tests on-target
defmt-test-macros./firmware/defmt-test/macrosProc Macros for defmt-test
defmt-json-schema./decoder/defmt-json-schemaDescribes the JSON emitted by defmt-decoder

MSRV

The minimum supported Rust version is 1.76 (or Ferrocene 24.05) for the crates that cross-compile to your microcontroller. The minimum supported Rust version is 1.83 for all host-side crates.

The defmt crates are tested against the latest stable Rust version and the MSRV.

Developer Information

Running Tests

Tests are run using cargo xtask -- although this is simply an alias (defined in .cargo/config.toml) for cargo run --package xtask --.

To see a list of options, see xtask/src/main.rs, or run:

cargo xtask help

For example, to run all the tests, run:

cargo xtask test-all

You will need qemu-system-arm installed and in your $PATH for some of the tests (e.g. test-snapshot).

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.

Similar Projects

Discover other similar projects and AI models.

Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
RepositoryRust
knurling-rs/flip-link

Adds zero-cost stack overflow protection to your embedded programs

451
Nov 13, 2026
RepositoryRust
farion1231/cc-switch

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

158.7k
Dec 2, 2026
RepositoryRust
tauri-apps/tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.

113.4k
Dec 1, 2026
RepositoryRust
spacedriveapp/spacedrive

Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.

39.6k
Nov 25, 2026
RepositoryTypeScript
toeverything/AFFiNE

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

81.6k
Dec 2, 2026
RepositoryTypeScript
nilbuild/developer-roadmap

Interactive roadmaps, guides and other educational content to help developers grow in their careers.

373.1k
Dec 1, 2026
RepositoryMarkdown
DigitalPlatDev/FreeDomain

Free domain registration and practical DNS learning resources for everyone.

209.9k
Aug 12, 2026
RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.9k
Dec 1, 2026