Rust + CHERI Working Group

CHERI Alliance Working Groups logo

About

The Rust + CHERI Working Group focuses on the integration and combination of the two technologies to ensure the best memory safety.

Working Group Leads

Edoardo Marangoni

Resources

This working group (WG) tracks the implementation progress of CHERI backends (RISC-V CHERI 64/32, CHERIoT and Morello) in the Rust compiler and associated toolchains.

  • Rust Morello compiler (GitHub)
    • Developed by the University of Kent.
    • Rust version 1.72.1, supports Morello and CHERI BSD (though an older version is required).
    • Includes full standard library, tested using compiler test suite.
    • The readme in the github repository contains a setup guide for users.
    • A release build for Linux is available, and includes an example.
  • Rust RISC-V CHERIoT compiler (GitHub)
    • Funded by UKRI, is a joint effort between SCI Semiconductor and the University of Kent.
    • Tracks beta and main branches from upstream Rust (currently version 1.93.beta and 1.94.nightly) and has the objective of adding CHERIoT as a target platform to Rust, also has the intent of making changes to the compiler so that it is easier to add other CHERI-like platforms such as Morello.
    • compiler-rt, core and alloc libraries, part of Rust’s standard library, compile. Testing the libraries above is an ongoing process.
    • CHERIoT-specific bits will be added to the compiler (mmio, shared objects, calling conventions..).
    • The readme in the GitHub repository contains a quick-start guide for end users.
    • It also contains an example of taking a rust crate to a flashable firmware from start to finish.

Want to get involved?