#no-std #packet #protocol #serial

no-std anpp

A Rust implementation of the Advanced Navigation Packet Protocol

3 stable releases

2.0.0 Oct 4, 2019
1.0.1 Jul 9, 2019
1.0.0 Jan 26, 2019

#579 in Embedded development

44 downloads per month


569 lines


pipeline status

(Rendered Documentation/Benchmarks)

A Rust port of the Advanced Navigation Packet Protocol, a low overhead communication protocol that can provide error checking and packetisation on top of (possibly noisy) raw byte stream.

Getting Started

To use this crate in your application you'll need to add it as a dependency in your Cargo.toml.

# Cargo.toml

anpp = { git = "https://gitlab.com/Michael-F-bryan/anpp" }

Then you can use it just like any other library:

extern crate anpp;

use anpp::{Decoder, Packet};
use anpp::errors::DecodeError;

fn decode_a_packet() -> Result<Packet, DecodeError> {
    // create the decoder and read some data into it
    let mut dec = Decoder::new();
    let data = read_some_data()?;

    // Now the decoder has some bytes to work with, we can decode the packet
    let pkt = dec.decode()?;


If you want to build this crate locally, first you'll need a copy of the source code.

$ git clone https://gitlab.com/Michael-F-Bryan/anpp

Then compile using the Rust build tool, cargo.

$ cargo build

From here you can run the tests, generate HTML documentation, or execute the benchmarks.

$ cargo test
$ cargo doc --open
$ cargo bench


This port is released under either the Apache 2 or MIT license, at your choosing.

The original Advanced Navigation Packet Protocol source code is available under the MIT license and can be found on the Advanced Navigation website as part of their Spatial SDK (link/direct download).