chore: prepare 0.1.0 for crates.io publish
- Cargo.toml: add documentation and readme fields; expand the exclude list so deny.toml, justfile, mise.toml, .github, .jj, fuzz, and any cargo-mutants output never ship in the published tarball. - README: badges, install snippet for both feature shapes, testing matrix. - CHANGELOG.md: keep-a-changelog skeleton with a 0.1.0 entry. - Revert framing.rs let-chain back to nested if-let so the published MSRV holds at the edition-2024 floor (1.85). Behaviour unchanged. cargo publish --dry-run packages cleanly.
This commit is contained in:
4 files changed
+93
-18
No files matched your search
@@ -1,25 +1,57 @@
|
||||
# donglora-protocol
|
||||
|
||||
Wire protocol types and COBS framing for DongLoRa, shared between firmware
|
||||
and host crates (`client-rs`, `mux-rs`, `bridge`).
|
||||
[](https://github.com/donglora/protocol/actions/workflows/ci.yml)
|
||||
[](https://crates.io/crates/donglora-protocol)
|
||||
[](https://docs.rs/donglora-protocol)
|
||||
|
||||
`no_std` by default. `defmt::Format` derives are opt-in via the default
|
||||
`defmt` feature. Host consumers disable default features:
|
||||
Wire protocol types and COBS framing for [DongLoRa], shared between the
|
||||
firmware and host crates (`client-rs`, `mux-rs`, `bridge`). `no_std`,
|
||||
zero-alloc, fixed-width little-endian — see the firmware repo's
|
||||
[`PROTOCOL.md`][protocol-md] for the full spec.
|
||||
|
||||
[DongLoRa]: https://github.com/donglora
|
||||
[protocol-md]: https://github.com/donglora/firmware/blob/main/PROTOCOL.md
|
||||
|
||||
## Install
|
||||
|
||||
```toml
|
||||
# Embedded / firmware (defmt::Format derives on by default):
|
||||
donglora-protocol = "0.1"
|
||||
|
||||
# Host (no defmt):
|
||||
donglora-protocol = { version = "0.1", default-features = false }
|
||||
```
|
||||
|
||||
## Status
|
||||
|
||||
Pre-1.0. Currently consumed by path dep; will publish to crates.io once
|
||||
the surface area settles.
|
||||
|
||||
## Layout
|
||||
|
||||
- `src/lib.rs` — `Command`, `Response`, `RadioConfig`, `ErrorCode`, etc.
|
||||
- `src/framing.rs` — `CobsDecoder` + `cobs_encode_response` for USB/UART
|
||||
transports.
|
||||
- `tests/` — proptest suite (roundtrips, bounded-capacity invariants,
|
||||
regional-regs, duty-cycle math).
|
||||
- `fuzz/` — cargo-fuzz targets on the parser and framer.
|
||||
- `src/lib.rs` — `Command`, `Response`, `RadioConfig`, `Bandwidth`,
|
||||
`ErrorCode` plus constants and validation/resolve helpers.
|
||||
- `src/framing.rs` — `CobsDecoder` (streaming) and `cobs_encode_response`.
|
||||
|
||||
## Features
|
||||
|
||||
| Feature | Default | What it does |
|
||||
|---------|---------|--------------|
|
||||
| `defmt` | yes | Derive `defmt::Format` on public enums. |
|
||||
| `std` | no | Enable `Debug`-based niceties for host-side fuzz / proptest. |
|
||||
|
||||
## Testing
|
||||
|
||||
The crate ships its own quality gate via `just test`:
|
||||
|
||||
| Gate | What runs |
|
||||
|------|-----------|
|
||||
| `test-unit` | nextest across all feature permutations + doc tests |
|
||||
| `test-clippy` | `-D warnings` across all feature permutations |
|
||||
| `test-fmt` | `cargo fmt -- --check` |
|
||||
| `test-doc` | `cargo doc --no-deps --all-features` |
|
||||
| `test-deny` | `cargo deny check` |
|
||||
| `test-fuzz` | 60 s on each of 7 cargo-fuzz targets (nightly) |
|
||||
| `test-miri` | miri on lib + vector tests, both feature shapes (nightly) |
|
||||
| `test-mutants` | cargo-mutants under both feature configurations |
|
||||
|
||||
The proptest suite alone exercises ~1.13M test cases per run.
|
||||
|
||||
## License
|
||||
|
||||
MIT — see [`LICENSE`](LICENSE).
|
||||
Reference in new issue
Block a user