Crates.io | capsule |
lib.rs | capsule |
version | 0.1.5 |
source | src |
created_at | 2020-04-03 21:18:06.439762 |
updated_at | 2021-03-11 03:16:45.213641 |
description | A framework for network function development. Written in Rust, inspired by NetBricks and built on Intel's Data Plane Development Kit. |
homepage | |
repository | https://github.com/capsule-rs/capsule |
max_upload_size | |
id | 226053 |
size | 676,585 |
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
The easiest way to start developing Capsule
applications is to use the Vagrant
virtual machine and the Docker
sandbox provided by our team. The sandbox is preconfigured with all the necessary tools and libraries for Capsule
development, including:
DPDK
19.11Clang
and LLVM
Rust 1.50
rr
5.3First install Vagrant
and VirtualBox
on your system. Also install the following Vagrant
plugins,
host$ vagrant plugin install vagrant-reload vagrant-disksize vagrant-vbguest
Then clone our sandbox repository, start and ssh into the Vagrant VM,
host$ git clone https://github.com/capsule-rs/sandbox.git
host$ cd sandbox
host$ vagrant up
host$ vagrant ssh
Once inside the created Debian
VM with Docker
installed, run the sandbox with the command,
vagrant$ docker run -it --rm \
--privileged \
--network=host \
--name sandbox \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
-v /lib/modules:/lib/modules \
-v /dev/hugepages:/dev/hugepages \
getcapsule/sandbox:19.11.6-1.50 /bin/bash
Remember to also mount the working directory of your project as a volume for the sandbox. Then you can use Cargo
commands inside the container as normal.
Add Capsule
as a dependency to your Cargo.toml
and start writing your application,
[dependencies]
capsule = "0.1"
If you want to develop Capsule
without using Docker
in Vagrant
, please check out our sandbox repo for instructions on running our Vagrant VM environment, as well as others options not using either Vagrant
or Docker
.
Thanks for your help improving the project! We have a contributing guide to help you get involved with the Capsule
project.
This project and everyone participating in it are governed by the Capsule Code Of Conduct. By participating, you agree to this Code. Please report any violations to the code of conduct to capsule-dev@googlegroups.com.
You can contact us either through Discord
or email.
The current maintainers with roles to merge PRs are:
This project is licensed under the Apache-2.0 license.