Initiative to rewrite the tools for the Xen hypervisor in Rust.

The developers of the XCP-ng platform, which is being developed under the auspices of the Xen project, have published a plan to create replacements for various components of the Xen software stack using the Rust programming language. There are currently no plans to overhaul the Xen hypervisor itself, with work primarily focused on rewriting individual components of the toolset.

Currently, the platform uses components written in C, Python, OCaml, and Go, some of which are outdated and create maintenance issues. It is noted that using Rust will not lead to an overall increase in the number of languages used, as only one component is implemented in Go, which is planned to be replaced first.

Rust has been chosen for its combination of high performance in the resulting code with capabilities for safe memory handling, eliminating the need for a garbage collector. It is suitable for developing both low-level and high-level components, providing additional capabilities to reduce potential errors such as variable borrowing checks. Rust is also more widely used than the currently employed language OCaml in XAPI, which will simplify attracting new developers to the project.

In the first phase, a replacement for several components will be developed to refine processes and prepare the groundwork for replacing other parts of the software stack. In particular, the Linux guest tools will be rewritten in Rust, which are currently implemented in Go, and the background process for metric collection, which is written in OCaml.

The need to redesign the Linux guest tools (xe-guest-utilities) has arisen due to code quality issues and development outside the Xen Project under the control of Cloud Software Group, which complicates package formation and community influence on development. The new version of the toolset (xen-guest-agent) is planned to be created from scratch, making it as simple as possible and separating the agent logic from the libraries. The background process for metric collection (rrdd) is to be redesigned as it is compact and isolated, facilitating experiments with the new language during development.

Next year, work may begin on the development of the Rust-based xenopsd-ng component, which will optimize the architecture of the software stack. The main idea is to consolidate work with the low-level API into one component and organize the provision of all high-level APIs to other components of the stack through it.

Current architecture of the Xen stack:

Initiative to rewrite the tools for the Xen hypervisor in Rust.

Proposed architecture of the Xen stack based on xenopsd-ng:

Initiative to rewrite the tools for the Xen hypervisor in Rust.


Source: opennet.ru
Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster