A Rust compiler for Arm's Morello processor.
Morello is an AArch64 ARM CPU enhanced with CHERI capabilities to provide hardware-enforced security protections for operating system and application memory. The Kent Rust compiler allows Rust programs to run on this platform, typically with no changes to safe Rust code.
What's provided?
- Rust version 1.56.0 (edition 2021)
- rustc with a Morello target
- CHERI compatible core and std libraries
- Cargo
What's not provided (yet)?
- more recent versions of Rust
- a compiler that will run directly on Morello (in capability mode)
- APIs to access extra capability features
- support for other CHERI enhanced architectures
Project background
The Digital Security by Design (DSbD) challenge aims to build a software ecosystem atop Morello, an ARM processor extended with capabilities. Capabilities combine a pointer to memory with permissions and bounds information that Morello processors use to enforce memory safety at run time, halting programs in error when safety is violated.
Rust is a systems language that provides memory safety to most code, with substantial industrial use, and it is the second language of the Linux kernel, after C. Rust excludes the vast majority of pointer misuse - ensuring memory safety - with a static (compile time) check, and a fall-back run-time check for complex cases.
We provide a Morello port of the Rust compiler. It can compile all safe Rust code to Morello without modification, and typical Rust programmers may target Morello with no change to their working practices. Programs compiled and run on Morello are memory safe, even in unsafe blocks where Rust makes no guarantee of safety.