feat: import wire protocol types from firmware
Copied src/protocol.rs from firmware verbatim, added crate-level #![no_std], migrated the defmt::Format derive gate from cfg_attr(not(test), ...) to cfg_attr(feature = "defmt", ...) so host-side (no-default-features) builds compile cleanly. Tests unchanged; all 35 pass. Firmware still owns the file for now — the re-export swap lands in a follow-up firmware commit to keep each change standalone.
This commit is contained in:
5 files changed
+802
No files matched your search
+35
@@ -0,0 +1,35 @@
|
||||
[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"
|
||||
keywords = ["lora", "radio", "protocol", "no-std"]
|
||||
categories = ["embedded", "no-std", "encoding"]
|
||||
exclude = ["fuzz", ".jj"]
|
||||
|
||||
[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"]
|
||||
# Enables `Debug` derives and other std-only niceties for host-side fuzz /
|
||||
# proptest builds. No-op on firmware.
|
||||
std = []
|
||||
|
||||
[dev-dependencies]
|
||||
proptest = "1"
|
||||
|
||||
[lints.clippy]
|
||||
unwrap_used = "deny"
|
||||
expect_used = "deny"
|
||||
panic = "deny"
|
||||
Reference in new issue
Block a user