GithubHelp home page GithubHelp logo

rusty-p4's Introduction

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.

rusty-p4's People

Contributors

another-s347 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rusty-p4's Issues

could not get this to build

This looks like a useful project, I would very much like to play with it!

With nightly rust (which is required) and the master branch, I get a lot of errors of this form while building:

error[E0277]: the trait bound `proto::v1::WriteRequest: prost::message::Message` is not satisfied
   --> /home/bpfaff/dddp/rusty-p4/target/debug/build/rusty-p4-proto-13932b727387435a/out/p4.v1.rs:953:199
    |
953 | ...rshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }, resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pr_ser, de: ::grpcio::pr_de }...
    |                    ^^^^^^^^^^^^^^^^ the trait `prost::message::Message` is not implemented for `proto::v1::WriteRequest`
    | 
   ::: /home/bpfaff/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-0.5.4/src/codec.rs:57:19
    |
57  |     pub fn ser<M: Message, B: BufMut>(msg: &M, buf: &mut B) {
    |                   ------- required by this bound in `grpcio::ser`

I played with it for some time and could not figure it out. I am a relative novice in Rust.

On the dev branch, with nightly rust, rusty-p4 builds OK, but so far I haven't been able to massage the first example from the Readme into working (although I'm still working on it). There isn't, for example, anything in the tree called P4InfoHelper, which the example tries to use. I could also not find where ParamValue::of is supposed to come from. And the example/ crate fails to build with errors that start out like this:

error: expected `:`
  --> src/bin/example.rs:30:17
   |
30 |             pipe="IngressPipeImpl";
   |                 ^
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected `:`

bootstrap.sh missing

Readme.md says:

2. Run bootstrap.sh.  

The repo doesn't contain such a file, or anything with a similar name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.