| Crates.io | defmt-stdout |
| lib.rs | defmt-stdout |
| version | 0.1.2 |
| created_at | 2025-12-23 15:09:38.812374+00 |
| updated_at | 2026-01-09 20:40:00.61459+00 |
| description | Transmit defmt log messages to the standard output (Linux only) |
| homepage | |
| repository | https://github.com/SakiiCode/defmt-stdout |
| max_upload_size | |
| id | 2001677 |
| size | 8,179 |
Forwards defmt frames to the standard output to make it usable on Linux desktops.
.cargo/config.toml
[build]
target = "x86_64-unknown-linux-gnu" # or -musl
[target.x86_64-unknown-linux-gnu]
rustflags = [
"-C", "relocation-model=static",
"-C", "link-arg=-T/usr/lib/x86_64-linux-gnu/ldscripts/elf_x86_64.x",
"-C", "link-arg=-Tdefmt.x"
]
linker = "gcc"
runner = "./runner.sh"
[target.x86_64-unknown-linux-musl]
rustflags = [
"-C", "relocation-model=static",
"-C", "link-arg=-T/usr/lib/x86_64-linux-gnu/ldscripts/elf_x86_64.x",
"-C", "link-arg=-Tdefmt.x"
]
runner = "./runner.sh"
[env]
DEFMT_LOG = "trace"
runner.sh
#!/bin/sh
$@ | defmt-print -e $1
chmod +x runner.sh
This way cargo run will be automatically piped into defmt-print
main.rs
use defmt_stdout as _;
See the discussion here and here and the defmt-serial project