Coder Social home page Coder Social logo

zmilan / capsule Goto Github PK

View Code? Open in Web Editor NEW

This project forked from capsule-rs/capsule

0.0 1.0 0.0 813 KB

A framework for network function development. Written in Rust, inspired by NetBricks and built on DPDK.

License: Apache License 2.0

Rust 99.60% C 0.29% Makefile 0.11%

capsule's Introduction

Crates.io Documentation Apache-2.0 licensed CI-Github Actions Codecov Code of Conduct Discord

Capsule

A framework for network function development. Written in Rust, inspired by NetBricks and built on Intel's Data Plane Development Kit.

Table of Contents

Overview

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.

Quick Start

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:

First 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.1-1.43 /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.

Contributing

Thanks for your help improving the project! We have a contributing guide to help you get involved with the Capsule project.

Code of Conduct

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 [email protected].

Contact

You can contact us either through Discord or email.

Maintainers

The current maintainers with roles to merge PRs are:

License

This project is licensed under the Apache-2.0 license.

capsule's People

Contributors

ari23 avatar clinedome avatar drunkirishcoder avatar scrollins avatar zeeshanlakhani avatar

Watchers

 avatar

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.