Xen Hypervisor Toolkit Rework Initiative in Rust

The developers of the XCP-ng platform, developed under the wing of the Xen project, have published a plan to create a Rust replacement for various components of the Xen software stack. The Xen hypervisor itself is not yet going to be processed, the work is mainly focused on reworking individual components of the toolkit.

The platform currently uses components in C, Python, OCaml, and Go, some of which are outdated and cause maintenance issues. It is noted that the use of Rust will not lead to an overall increase in the number of languages ​​involved, since only one component is implemented in Go, which is planned to be replaced in the first place.

Rust was selected as combining high output code performance with memory-safe capabilities, being garbage collector-free, suitable for developing both low-level and high-level components, and providing additional features to reduce potential bugs, such as variable borrowing checker (borrow checker). ). Rust is also more widespread than the current XAPI language OCaml, which will make it easier to attract new developers to the project.

At the first stage, it is planned to develop replacements for several components in order to work out the processes and prepare the basis for replacing other parts of the software stack. In particular, first of all, the Linux guest tools will be rewritten in Rust, for which the Go language is currently used, and the background process for collecting metrics, written in OCaml.

The Linux guest tools (xe-guest-utilities) need to be redesigned due to code quality issues and development outside of the Xen Project under the control of the Cloud Software Group, making it difficult for packaging and community influence on development. A new version of the toolkit (xen-guest-agent) is planned to be created completely from scratch, making it as simple as possible and separating the agent logic from the libraries. It was decided to rework the background process for collecting metrics (rrdd) as it is compact and separate, which makes it easier to experiment with the use of a new language during development.

Next year, work will probably begin on the development of the xenopsd-ng component in Rust, which will allow us to optimize the architecture of the software stack. The main idea is to concentrate work with a low-level API in one component and organize the provision of all high-level APIs to the rest of the stack through it.

Current Xen stack architecture:

Xen Hypervisor Toolkit Rework Initiative in Rust

Suggested Xen stack architecture based on xenopsd-ng:

Xen Hypervisor Toolkit Rework Initiative in Rust


Source: opennet.ru

Add a comment