XCP-ng Initating Effort To Rewrite Xen Components In Rust
The focus of this new effort isn't to immediately rewrite the Xen virtualization hypervisor in Rust but to begin gradually working toward rewriting some of the smaller Xen Project components in the Rust programming language and to see how everything pans out.
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:
More details on the XCP-ng blog for those interested.
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.
64 Comments