Show Your Support: Did you know that you can get Phoronix Premium for under $4 per month? Try it today to view our site ad-free, multi-page articles on a single page, and more while the proceeds allow us to write more Linux hardware reviews. At the very least, please disable your ad-blocker.
XCP-ng Initating Effort To Rewrite Xen Components In Rust
The XCP-ng project announced their intention to begin working on future contributions to the Xen Project in the Rust programming language. As it stands now Xen and XCP-ng are made up of a mix of C, Python, OCaml, and Go code. Like many other projects, they are eyeing the Rust programming language for being both performant and its memory safety traits. Rust's safety abilities while not having a garbage collector is desired by the XCP-ng crew and Rust's borrow checker may further help the Xen cause.
As for Xen itself in Rust, they note:
That's a very good question: should we start to bring Rust directly inside the Xen hypervisor itself?
Since it's a very "low level" piece of code, a micro-kernel, you can already have very specific and weird issues while it's mostly written in C (and tiny bits in Assembly). It's not rare to have something like a compiler optimization generating bugs, despite the maturity of the C ecosystem (even with gcc)!
That's why we prefer to start with simple things and a higher level first, while getting more experience in Rust. The other thing to do is to monitor Rust maturity on "very close to the metal" behaviors and potential unwanted side effects.
More details on the XCP-ng blog for those interested.