Cargo Features

defmt has no features set by default.

[dependencies]
defmt = { version = "0.3.8", features = ["ip_in_core", "encoding-raw", "encoding-rzcobs", "unstable-test"] }
alloc avoid-default-panic ip_in_core
encoding-raw

Encoding feature flags. These should only be set by end-user crates, not by library crates.

If no encoding is selected, defmt will assume the encoding is "don't care" and will pick a default one. The current default is encoding-rzcobs. The default may change in minor releases, changing it is not considered a breaking change since all encodings are guaranteed to be supported by the corresponding defmt-decoder version.

Raw encoding: All log frames are concatenated and sent over the wire with no framing or compression. This is the fastest CPU-wise, but may end up being slower if the limiting factor is wire speed.

encoding-rzcobs

rzCOBS encoding: Performs framing on the log frames using reverse-COBS, additionally applying a light compression for data known to contain many zero bytes, like defmt streams.
The framing allows the decoder to recover from missing or corrupted data, and start decoding in the middle of a stream, for example when attaching to an already-running device.

unstable-test

WARNING: for internal use only, not covered by semver guarantees

Enables unstable-test of defmt-macros

Affects export::fetch_string_index, export::fetch_add_string_index, export::fetch_bytes, export::acquire, export::release, export::write, export::timestamp, export::panic