#sdn #networking #p4

nightly rusty-p4

A (WIP) library for writing P4 controller in Rust

2 releases

0.1.0-alpha.2 Sep 13, 2019
0.1.0-alpha.1 Aug 30, 2019

#2 in #sdn

30 downloads per month

Apache-2.0

125KB
3.5K SLoC

Work in Progress

I hope I can finish this.

Rusty P4 Build (Linux) License dev doc

A Work-in-progress composable and lightweight library for writing P4Runtime controller in Rust. The goal is to bring powerful & expressive tools into the world of P4 and SDN so that developers can test their ideas faster.

It's trying to provide multi-level APIs for writing controllers with different complexity (see Examples below). Some design come from the tutorials of P4 and ONOS.

Repo structure

  • rusty-p4-core. The core of rusty-p4, providing the basic building blocks like App trait, Service trait, P4 runtime, Pipeconf, flow and some other things.
  • rusty-p4-packet. Provides methods to parse packets.
  • rusty-p4-northbound. Provides impls for northbound server.
  • rusty-p4-app. Provides some simple application implementation.

Getting Started

Current version hasn't been published, so to use it, add

rusty-p4 = { git="https://github.com/another-s347/rusty-p4" }

to your Cargo.toml.

Built With

  • tonic - gRPC for Rust.
  • PI - P4Runtime
  • tokio - The asynchronous run-time for the Rust programming language.

Dependencies

~63MB
~1M SLoC