| Crates.io | korri-n2k |
| lib.rs | korri-n2k |
| version | 0.1.1 |
| created_at | 2025-10-24 15:01:09.914429+00 |
| updated_at | 2025-10-29 13:58:29.212105+00 |
| description | no_std NMEA2000 protocol implementation for embedded systems |
| homepage | |
| repository | https://github.com/fard-draf/korri-n2k |
| max_upload_size | |
| id | 1898542 |
| size | 2,109,468 |
korri-n2k is a no_std, no_alloc implementation of the NMEA 2000 / ISO 11783 protocol stack for embedded Rust targets.
The crate focuses on deterministic behaviour (compile-time PGN layout, zero heap usage) and interoperates with async runtimes built on top of embassy. It is designed for MCUs with tight RAM/flash budgets and for firmware teams that need explicit control over message scheduling, address claiming, and Fast Packet segmentation.
AddressManager and the new optional AddressServiceCanBus, KorriTimer) compatible with embassy executorskorri-n2k, embassy-time, embassy-sync, embedded-can, static_cell).CanBus, KorriTimer) against your HAL.AddressManager for full control, or AddressService to get a supervisor (claim loop + optional command queue).PgnXXXX structures to serialize, transmit, and decode messages.The examples/std/quickstart.rs sample shows a host-side flow. Hardware-ready showcase projects (ESP32-S3, ESP32-C3, STM32G4 in progress) live under examples-bsp/.
The repository ships with standalone BSP-oriented crates under examples-bsp/ (each with its own Cargo.toml, toolchain and configuration):
| Board | Status | Notes |
|---|---|---|
| ESP32-S3 | ✅ Supported | Async TWAI driver, AddressService usage |
| ESP32-C3 | ✅ Supported | Same supervisor integration via TWAI |
| STM32G4 (WIP) | 🚧 Work in progress | Hardware pending |
cargo doc --no-depscargo testbuild_core/var/pgn_manifest.json or point KORRI_N2K_MANIFEST_PATH to your configuration; the build script takes care of downloading canboat.json with curl/wget (or falls back to ureq with the build-download feature).Core modules to explore:
| Module | Purpose |
|---|---|
protocol::messages::* |
Generated PGN structures |
protocol::transport::fast_packet |
Builder + assembler for segmented PGNs |
protocol::managment::address_manager |
ISO address claiming/defence |
protocol::managment::address_supervisor |
Optional supervisor wrapping the manager |
infra::codec |
Bit-level codecs, lookup tables |
scripts/download_canboat.sh — refresh canboat.jsonscripts/verify_docs.sh — run the documentation examples + unit tests + formattingMIT OR Apache-2.0 — choose either license. See LICENSE for details.