The wire protocol is re-specified as DongLoRa Protocol v2 (see PROTOCOL.md). Every type_id, tag-correlation rule, and field layout is incompatible with 0.1.0. * Add PROTOCOL.md as the normative spec for the v2 wire format. * Replace framing.rs with a streaming FrameDecoder that emits (type_id, tag, payload) triples on each COBS-delimited, CRC-checked frame. * Split the single-file lib.rs into dedicated modules: frame, commands, events, errors, modulation, info, crc, chip_id. Re-exports preserve convenience imports at the crate root. * Replace RadioConfig / Bandwidth with a Modulation enum covering LoRa, FSK/GFSK, LR-FHSS, and FLRC, each with its own typed parameter struct. * Add TxFlags, RxOrigin, SetConfigResult, OkPayload to model v2 response shapes, and RadioChipId for GET_INFO. * Rewrite fuzz corpus: replace the 4 cobs_* / command_roundtrip targets with decoder_feed, frame_roundtrip, lora_config_roundtrip, and parse_device_message; drop parse_radio_config. * Expand proptest and mutation-killer coverage for the new wire shape. * Rewrite canonical-byte test vectors against the v2 spec.
53 lines
1.3 KiB
TOML
53 lines
1.3 KiB
TOML
[package]
|
|
name = "donglora-protocol"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
rust-version = "1.85"
|
|
authors = ["Stephen Waits <steve@waits.net>"]
|
|
license = "MIT"
|
|
description = "DongLoRa wire protocol types and COBS framing — shared between firmware and host crates"
|
|
repository = "https://github.com/donglora/protocol"
|
|
homepage = "https://github.com/donglora/protocol"
|
|
documentation = "https://docs.rs/donglora-protocol"
|
|
readme = "README.md"
|
|
keywords = ["lora", "radio", "protocol", "no-std"]
|
|
categories = ["embedded", "no-std", "encoding"]
|
|
exclude = [
|
|
".github",
|
|
".jj",
|
|
"deny.toml",
|
|
"fuzz",
|
|
"justfile",
|
|
"mise.toml",
|
|
"mutants.out",
|
|
"mutants.out.old",
|
|
]
|
|
|
|
[dependencies]
|
|
heapless = "0.9"
|
|
ucobs = "0.3"
|
|
defmt = { version = "1", optional = true }
|
|
|
|
[features]
|
|
default = ["defmt"]
|
|
# Enables `defmt::Format` derives on public types. On by default so firmware
|
|
# (the primary no_std consumer) just works; host crates disable default-features.
|
|
defmt = ["dep:defmt", "heapless/defmt"]
|
|
# Enables `Debug` derives and other std-only niceties for host-side fuzz /
|
|
# proptest builds. No-op on firmware.
|
|
std = []
|
|
|
|
[dev-dependencies]
|
|
proptest = "1"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
|
|
[lints.rust]
|
|
unsafe_code = "forbid"
|
|
|
|
[lints.clippy]
|
|
unwrap_used = "deny"
|
|
expect_used = "deny"
|
|
panic = "deny"
|