# knurling-rs/defmt

Efficient, deferred formatting for logging on embedded systems

Repository: https://github.com/knurling-rs/defmt
Canonical: https://ross.abutalabs.com/products/defmt
Homepage: https://defmt.ferrous-systems.com/
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: logging, embedded-systems, rust, rust-tools, ferrous-systems
Last push: 2026-09-02T11:00:53+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 79, longevity 100
- inputs: {"age_days": 2231, "days_push": 0, "days_rel": 61, "gap_med": 78.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1218, forks 132 (observed 2026-09-03T02:15:14.108754+00:00)

## What it is
defmt is a highly efficient logging framework for Rust targeting resource-constrained embedded devices like microcontrollers. It uses deferred formatting and compile-time string compression so the target sends compact binary data while formatting happens on the host machine.

## Use cases
- log messages from a microcontroller with minimal flash and bandwidth overhead
- send embedded logs over RTT, ITM, or semihosting to a host PC
- decode and print defmt-encoded logs on the host
- filter log levels at compile time with module-level granularity
- run tests on-target with formatted output
- send panic messages from firmware to a debugger

## When to choose
- you're writing Rust firmware for a microcontroller and need fast, low-overhead logging
- your target has no display and logs must be transferred to a host machine
- you want compile-time log filtering and compact string encoding
- you need on-target test and panic reporting integrated with your logger

## When to avoid
- you're logging on a host platform like a web server where standard loggers suffice
- your firmware output format isn't ELF or you can't customize linker scripts
- you need multiple independent global logger instances
- you're not using Rust

## Facets
- artifact type: library
- maturity: active
- function: logging, serialization, cli, testing
- domain: embedded-systems, developer-tools
- platform: embedded, rust, cli, cross-platform
- tags: deferred-formatting, microcontrollers, rtt, itm, semihosting, panic-handler, on-target-testing, string-compression, rust

## Member repositories
- knurling-rs/defmt (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:14.108754+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:17:16.655694+00:00, confidence not recorded.
  - readme: https://github.com/knurling-rs/defmt (fetched 2026-09-03T02:15:14.108754+00:00, sha 00f3b68ce234)
  - homepage: https://defmt.ferrous-systems.com/ (fetched 2026-08-29T12:25:12.742298+00:00, sha 444c4b0cd79f)
  - registry_crates: https://crates.io/api/v1/crates/defmt (fetched 2026-08-29T12:25:12.744840+00:00, sha dea2e51180d7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
