Skip to content
@ndn-cluster-rs

ndn-cluster-rs

ndn-cluster-rs

Rust implementations of the Named Data Networking (NDN) protocol stack, published as a set of layered crates.

Named Data Networking is an information-centric networking architecture: instead of addressing hosts, consumers request content by name, and any node holding a validly signed copy of that content can answer. These crates implement NDN's wire format and packet types, so applications can speak NDN without hand-rolling the protocol themselves.

Crates

The stack is layered bottom-up -- each crate depends only on the ones below it, and each is usable on its own.

  • ndn-tlv -- Provides abstractions for working with TLV-encoded data, the binary format every NDN packet is built from.
  • ndn-tlv-derive -- The Tlv derive macro ndn-tlv uses to implement its TlvEncode, TlvDecode, and Tlv traits for structs and enums.
  • ndn-protocol -- Implements the core NDN packet types -- names, Interests, Data, and signatures -- on top of ndn-tlv.
  • ndn-ndnlp -- A partial implementation of NDNLPv2, the link-layer protocol NDN packets are framed in before being sent over a transport.
  • ndn-nfd-mgmt -- A partial implementation of the NFD Management protocol, used to send control commands -- like registering a route -- to a locally running NFD forwarder.
  • ndn-app -- An application framework for building NDN applications in Rust, on top of ndn-ndnlp, ndn-nfd-mgmt, and ndn-protocol.

ndn-ndnlp and ndn-nfd-mgmt only implement as much of their respective protocols as ndn-app needs -- they are not complete implementations of NDNLPv2 or the NFD management protocol.

Getting started

Most applications only need ndn-app:

cargo add ndn-app

See its README for a worked example. If you only need packet encoding and decoding without the application framework, ndn-tlv or ndn-protocol may be enough on their own.

Building from source

Each crate lives in its own repository rather than a monorepo, but they depend on each other during development via relative path dependencies in their Cargo.toml (e.g. ndn-protocol depends on ../ndn-tlv). To build one of these crates from its git repository rather than from crates.io, clone the crates it depends on as sibling directories with names matching the crate names:

some-directory/
├── ndn-tlv/
├── ndn-tlv-derive/
├── ndn-protocol/
├── ndn-ndnlp/
├── ndn-nfd-mgmt/
└── ndn-app/

ndn-app depends, directly or transitively, on all of the others, so building it from source needs all six repositories present. Building a lower-level crate like ndn-tlv on its own only needs ndn-tlv-derive alongside it.

This only matters when building from the git repositories directly -- adding one of these crates with cargo add pulls the published version from crates.io and doesn't require anything to be cloned locally.

License

MIT


Produced as part of a Master's thesis in Computer Science.

Popular repositories Loading

  1. ndn-tlv-derive ndn-tlv-derive Public

    The Tlv derive macro ndn-tlv uses to implement its TlvEncode, TlvDecode, and Tlv traits for structs and enums.

    Rust 2

  2. ndn-tlv ndn-tlv Public

    Provides abstractions for working with TLV-encoded data, the binary format every NDN packet is built from.

    Rust 2

  3. ndn-protocol ndn-protocol Public

    Implements the core NDN packet types -- names, Interests, Data, and signatures

    Rust 2

  4. ndn-nfd-mgmt ndn-nfd-mgmt Public

    A partial implementation of the NFD Management protocol, used to send control commands -- like registering a route -- to a locally running NFD forwarder.

    Rust 1

  5. ndn-ndnlp ndn-ndnlp Public

    A partial implementation of NDNLPv2, the link-layer protocol NDN packets are framed in before being sent over a transport.

    Rust 1

  6. ndn-app ndn-app Public

    An application framework for building NDN applications in Rust.

    Rust 1

Repositories

Showing 7 of 7 repositories

Top languages

Loading…

Most used topics

Loading…