A framework for network function development. Written in Rust, inspired by
NetBricks and built on Intel's Data Plane Development Kit.
The goal of Capsule is to offer an ergonomic framework for network function development that traditionally has high barriers of entry for developers. We've created a tool to efficiently manipulate network packets while being type-safe, memory-safe, and thread-safe. Building on DPDK and Rust, Capsule offers:
- a fast packet processor that uses minimum number of CPU cycles.
- a rich packet type system that guarantees memory-safety and thread-safety.
- a declarative programming model that emphasizes simplicity.
- an extensible and testable framework that is easy to develop and maintain.
Getting started
The easiest way to start developing Capsule applications is to use the
Vagrant virtual machine and the Docker sandbox provided by the
Capsule team. The sandbox is preconfigured with all the necessary tools and
libraries for Capsule development, including:
DPDK 18.11ClangandLLVMRust 1.42rr5.3
For more information on getting started, please check out Capsule's
README, as well as our sandbox repo for developer environments.
Adding Capsule as a Cargo dependency
[]
= "0.1"
To enable test/bench features for example, you can include Capsule in your
Cargo dependencies with the testils feature flag:
[]
= { = "0.1", = ["testils"] }
Feature flags
default: Enables metrics by default.metrics: Enables automaticmetricscollection.pcap-dump: Enables capturing port traffic to (.pcap) files.testils: Enables utilities for unit testing and benchmarking.full: Enables all features.