feat(kerykeion): crate scaffold with mesh types, config, and protobuf codegen#52
Merged
forkwright merged 2 commits intomainfrom Mar 19, 2026
Merged
feat(kerykeion): crate scaffold with mesh types, config, and protobuf codegen#52forkwright merged 2 commits intomainfrom
forkwright merged 2 commits intomainfrom
Conversation
… codegen - New kerykeion crate for Meshtastic mesh networking - Protobuf codegen from 8 vendored Meshtastic .proto files via prost-build - Core types: NodeNum, PacketId, ChannelIndex newtypes with validation - MeshConfig with TOML deserialization (serial/TCP/BLE connections, channel PSKs) - MeshConnection async trait for transport abstraction (implementations in P2-02) - NodeDb for in-memory node tracking with insert/get/remove/iter - Collector trait + MeshCollector stub - snafu Error enum with 14 variants, all with implicit Location tracking - 28 tests covering types, errors, config, node_db, collector, proto roundtrips - New workspace deps: prost, tokio-serial, btleplug, aes, ctr, x25519-dalek, petgraph, mdns-sd, rusb, tokio-util, bytes, proptest, nix, uuid, prost-types Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Consider splitting into smaller PRs for easier review. Not a blocker, just a signal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kerykeioncrate for Meshtastic mesh networking.protofiles via prost-buildNodeNum,PacketId,ChannelIndexnewtypes with validationMeshConfigwith TOML deserialization (serial/TCP/BLE connections, channel PSKs)MeshConnectionasync trait for transport abstraction (implementations in P2-02)NodeDbfor in-memory node tracking with insert/get/remove/iterCollectortrait +MeshCollectorstubErrorenum with 14 variants, all with implicitLocationtrackingprost,tokio-serial,btleplug,aes,ctr,x25519-dalek,petgraph,mdns-sd,rusb,tokio-util,bytes,proptest,nix,uuid,prost-typesTest plan
cargo fmt --all -- --checkpassescargo clippy --workspace --all-targets -- -D warningspassescargo test --workspace— 28 kerykeion tests + 385 workspace total, 0 failurescargo test --workspace --docpassesMeshPacket,ToRadio,FromRadio)MeshConfigfrom inline TOML string)NodeDbCRUD: insert, get, remove, iter, replaceChannelIndexout-of-range validationFRAME_MAGIC,MAX_PACKET_SIZE,BROADCAST_ADDR)Observations
Observation 1 — Debt (
src/collector.rs:1):koinon::Collectordoes not exist as a trait. TheCollectortrait is defined locally inkerykeion::collectoras a placeholder. Before P2-05 (gateway bridge), either koinon should be extended with aCollectortrait (preferred — shared contract across all crates) or the local definition should be moved to a dedicatedakroasis-corecrate.Observation 2 — Idea (
crates/kerykeion/proto/meshtastic/): Vendored proto files are pinned to a snapshot derived from Meshtastic firmware knowledge as of 2026-03-18. Aproto/VERSIONfile noting the upstream protobufs release tag (e.g.v2.5.18) would make upgrade diffs clearer and help CI detect drift.Observation 3 — Missing test (
src/config.rs): TheChannelPskwith non-empty PSK bytes (16-byte AES-128 key) has no test. The existing config test uses an empty PSK slice. A roundtrip test with a 16-byte PSK would catch accidental base64/binary encoding regressions when the TOML layer changes.Observation 4 — Doc gap (
src/connection.rs):MeshConnectionhas no crate-level example showing how a concrete implementation is expected to be wired up. The first implementor (P2-02 serial) will need to discover theSend + Syncconstraint on the associated future types through the compiler rather than documentation.🤖 Generated with Claude Code