9 Commits
Author SHA1 Message Date
swaits 77addfa698 fix: connect() no longer falls through from mux to USB serial
When a mux socket file exists, connect(None, timeout) and try_connect()
now commit to the mux — returning an error if unreachable instead of
silently falling through to USB serial. This prevents a race condition
where a client could steal the serial port from the mux during reconnect.

Callers with explicit port = Some(...) are unaffected.
v0.2.1
2026-04-07 18:04:07 -06:00
swaits a7e93ab56b feat!: v0.2.0 — ping-on-connect validation, try_connect, publish polish
- Add ping-on-connect handshake: all connect functions validate the device
  within 200ms, rejecting non-DongLoRa serial devices immediately
- Add try_connect() — non-blocking connect that errors instead of blocking
  forever when no USB device is present
- Add payload size validation in transmit() (max 256 bytes)
- Add ErrorCode: impl std::error::Error
- Fix drain_rx error handling (no longer swallows original error)
- Fix repository URL to github.com/donglora/client-rs
- Remove wire-level tag constants from top-level re-exports
- Add rust-version (MSRV 1.85), homepage, exclude fields to Cargo.toml
- Add examples/ping.rs
- Allow clippy unwrap/expect in test modules
v0.2.0
2026-04-07 15:52:37 -06:00
swaits 5cec7dcd58 chore: add consistent mise.toml, justfile, and tooling config 2026-04-07 14:41:26 -06:00
swaits 75d70df294 WIP: get Heltec V3 working 2026-04-07 07:58:57 -06:00
swaits b2e4bb0476 WIP: functional checkpoint! 2026-04-06 21:15:35 -06:00
swaits 7dd717a887 fix(clients/rust): harden client resilience for v0.1.0 release
- Track serial timeout in field instead of returning hardcoded 2s
- Always restore timeout in drain_rx, even on read errors
- Handle EINTR/Interrupted in read_frame (retry instead of error)
- Use connect_timeout for TCP mux (no more 2-min hangs)
- Set write timeout on mux sockets (unix + tcp)
- Log unexpected unsolicited frames in recv via tracing::warn
- Add unix socket timeout test for WouldBlock handling
- Add CHANGELOG.md, remove resolved CLAUDE_TODO.md
v0.1.0
2026-04-06 14:00:42 -06:00
swaits 0676bd4606 fix(clients/rust): use ucobs instead of cobs crate
Switch from the third-party cobs crate to ucobs — the same COBS
implementation used by the firmware. Keeps the entire stack on one
COBS library.
2026-04-04 09:36:32 -06:00
swaits 8e38b5d09c docs: add README and LICENSE to Rust client and mux crates 2026-04-03 17:24:49 -06:00
swaits f16b36b138 feat: add Rust client library and mux daemon
Add donglora-client (clients/rust/) and donglora-mux (mux/rust/) as
Rust implementations of the existing Python client library and mux
daemon. Both are standalone Cargo projects with no-panic guarantees
enforced by clippy deny lints.

donglora-client provides protocol types, COBS framing, USB device
discovery, serial/mux transports, and a high-level Client<T> with
send/recv. donglora-mux is a fully async (tokio) multiplexer daemon
with dongle hot-plug reconnect, per-client bounded send queues,
SetConfig locking, and StartRx/StopRx reference counting.

52 unit tests across both crates. Updates README roadmap checkboxes
and CONTRIBUTING docs to reflect the new implementations.
2026-04-03 17:21:51 -06:00