nightly sys sel4-sys

Rust interface to the seL4 kernel

25 releases

Uses old Rust 2015

0.0.28 Apr 24, 2017
0.0.27 Jan 11, 2017
0.0.23 Dec 31, 2016
0.0.22 Oct 30, 2016
0.0.3 Sep 26, 2015

#174 in Profiling

Download history 27/week @ 2023-06-08 28/week @ 2023-06-15 50/week @ 2023-06-29 21/week @ 2023-07-06 1/week @ 2023-07-13 2/week @ 2023-07-20 2/week @ 2023-07-27 2/week @ 2023-08-03 1/week @ 2023-08-10 56/week @ 2023-08-17 28/week @ 2023-08-24 3/week @ 2023-08-31 31/week @ 2023-09-07 29/week @ 2023-09-14 2/week @ 2023-09-21

65 downloads per month
Used in 2 crates


43K SLoC

C 29K SLoC // 0.1% comments Python 9K SLoC // 0.3% comments GNU Style Assembly 2.5K SLoC // 0.2% comments Rust 2K SLoC // 0.0% comments Shell 59 SLoC // 0.6% comments Vim script 19 SLoC // 0.2% comments




A Rust interface to the seL4 kernel. Raw syscall bindings, kernel API, and data structure declarations. Provides the same interface that libsel4 does, with a few C-isms reduced.

NOTE: be sure to git submodule update --recursive --init if you clone this repository, as we pull in seL4 via a submodule.

Updating to a new version of seL4

Updating to a new version of seL4 isn't hard, but it can be annoying. First, cd into the seL4 submodule, do a git fetch, and checkout the new version you want to evaluate. Then, do a cargo build. At that point, you can try running cargo build. It probably won't succeed, due to changes in API and the Python tools.

To fix the Python tools, I use a command like:

diff -u seL4/tools/bitfield_gen.py tools/bitfield_gen.py | pygmentize | less -R

I then carefully look at the diff to see if there are any meaningful differences. One challenge when doing this is that a lot of some of the tools has been ripped out, because it deals with topics Robigalia doesn't need to care about (bitfield proofs, or declaration order, for example).

Once you have a successful cargo build, you're not done. It's likely that the kernel added, removed, or otherwise changed various pieces of the ABI. In particular, inspect lib.rs and update for any changes in the IPC buffer (unlikely) or bootinfo (increasingly unlikely). Update arch/x86_64.rs etc for any changes in the object types. Changes are usually easy to see by a cd into seL4/libsel4 and a git diff X.0.0..Y.0.0.

As a quick smoketest, go to the hello-world repository and compile and run it with the new kernel and sel4-sys.

After that, it's time to update the sel4 crate and any other impacted user components.


Mostly complete, though largely untested.


  • Add support iterating over the seL4_BootInfoHeader
  • Add automated, comprehensive tests
  • Formal verification that the code actually follows the implemented ABI.