1[package]
2authors = [ "The Knurling-rs developers" ]
3categories = [
4 "embedded",
5 "no-std",
6 "development-tools::debugging",
7 "value-formatting",
8]
9description = "A highly efficient logging framework that targets resource-constrained devices, like microcontrollers"
10edition = "2021"
11keywords = [ "knurling", "logging", "logger", "formatting", "formatter" ]
12license = "MIT OR Apache-2.0"
13links = "defmt" # Prevent multiple versions of defmt being linked
14name = "defmt"
15readme = "README.md"
16repository = "https://github.com/knurling-rs/defmt"
17homepage = "https://knurling.ferrous-systems.com/"
18version = "1.0.1"
19
20[features]
21alloc = []
22avoid-default-panic = []
23ip_in_core = []
24
25# Encoding feature flags. These should only be set by end-user crates, not by library crates.
26#
27# If no encoding is selected, `defmt` will assume the encoding is "don't care" and
28# will pick a default one. The current default is `encoding-rzcobs`. The default may change
29# in minor releases, changing it is not considered a breaking change since all encodings
30# are guaranteed to be supported by the corresponding `defmt-decoder` version.
31
32# Raw encoding: All log frames are concatenated and sent over the wire with no framing or compression.
33# This is the fastest CPU-wise, but may end up being slower if the limiting factor is wire speed.
34encoding-raw = []
35
36# rzCOBS encoding: Performs framing on the log frames using reverse-COBS, additionally applying a
37# light compression for data known to contain many zero bytes, like defmt streams.
38# The framing allows the decoder to recover from missing or corrupted data, and start decoding
39# in the middle of a stream, for example when attaching to an already-running device.
40encoding-rzcobs = []
41
42# WARNING: for internal use only, not covered by semver guarantees
43unstable-test = [ "defmt-macros/unstable-test" ]
44
45[dependencies]
46# There is exactly one version of defmt-macros supported in this version of
47# defmt. Although, multiple versions of defmt might use the *same* defmt-macros.
48defmt-macros = { path = "../macros", version = "=1.0.1" }
49bitflags = "1"
50
51[dev-dependencies]
52rustc_version = "0.4"
53trybuild = "1"
54
55[package.metadata.docs.rs]
56features = [ "alloc" ]
57rustdoc-args = [ "--cfg=docsrs" ]
58targets = [ "thumbv6m-none-eabi", "thumbv7em-none-eabihf" ]
59