seL4 / rust-sel4

Rust support for seL4 userspace
85 stars 10 forks source link

Rust support for seL4 userspace

This repository contains crates for supporting the use of Rust in seL4 userspace. So far, this includes:

The ./hacking directory contains scripts for developing and testing these crates using Nix and, optionally, Docker.

This work is funded by the seL4 Foundation.

Rendered rustdoc

https://sel4.github.io/rust-sel4/

Compatible versions of related seL4 Foundation projects

This project builds upon seL4 and the seL4 Microkit. In particular, this project works with at least the following versions of those related projects:

Demos

Overview of crates

General crates
Runtime crates
Complete programs

Integrating these crates into your project

The best way to learn how to integrate these crates into your project is to check out the concrete examples of their use listed above.

These crates are not yet hosted on crates.io. Use them either as Git or path Cargo dependencies.

Some of these crates depend, at build time, on external components and configuration. In all cases, information for locating these dependencies is passed to the dependant crates via environment variables which are interpreted by build.rs scripts. Here is a list of environment variables and the crates which use them:

Quick start for running the tests in this repository

The only requirements for building and running the tests in this repository are Linux, Make, rustup, and Nix. This repository contains scripts for setting up a Docker container with a suitable development environment in case you aren't on Linux or don't want to install Nix.

First, clone this repository:

git clone https://github.com/seL4/rust-sel4
cd rust-sel4

If you are using Docker, build, run, and enter a Docker container for development. This container mounts this repository's top-level at /work.

cd hacking/docker && make run && make exec

At this repository's top-level directory, build and simulate a simple seL4-based system with a root task written in Rust (this will take a few minutes):

make example # use 'ctrl-a x' to exit the simulation

Build and run all of this repository's automated tests:

make run-tests