NEWS

新闻

了解openKylin最新资讯,关注社区和产品动态。

NEWS

Learn about the latest news.

In sync with global technological evolution, openKylin 3.0 moves from C to Rust.

2026-07-16 16:32:12
Why Change?

Anyone who has used a Linux system has probably encountered this—a program suddenly crashes, leaving only a "Segmentation fault" message with no specific cause. Such crashes are mostly due to memory safety issues: out-of-bounds access, dangling pointers, buffer overflows. Over 70% of high-risk vulnerabilities have their root cause here.


The root cause of this problem lies in C/C++ leaving memory management to developers. Rust takes a different approach—through ownership and borrow checking, it strictly verifies reference validity for safe code at compile time, and adds boundary checks and panics at runtime, thereby eliminating illegal memory access in safe code. Memory risks can only be introduced in unsafe code.


Upstream Rustification is accelerating

Currently, the Linux kernel has merged over 20,000 lines of Rust code, mainly as an adaptation layer bridging C and Rust, and Rust will be used for developing new drivers and new subsystems.


In response to this technological evolution trend,the OpenAtom openKylin (referred to as "openKylin")community has established the RFL SIG group, which specifically maintains the openkylin/rust-for-linux tracking repository, continuously following upstream Rust integration progress, and making technical preparations for introducing Rust capabilities into openKylin 3.0 and future versions. This repository focuses on tracking features like Rust drivers, complementing the main kernel repository (openkylin/linux)—the main repository handles the "kernel for now," while rust-for-linux handles the "Rust capability reserve for the future kernel."

openKylin

Simultaneous transformation of openKylin 3.0 system tools

In addition to the kernel, system tools running in user space are also the "load-bearing walls" of the system—tools like time, wget, etc. These seemingly inconspicuous command-line tools are frequently called by various scripts, compilation processes, applications, etc., every day. If a problem occurs, it triggers a chain reaction. Therefore, from dozens of candidate components, we filtered out high-risk items such as system core, boot chain, and desktop framework layers, and selected the first batch for Rust transformation experiments:


Upstream Component

Transformed Component

Function

Risk Level

time

kylin-time

Timing tool, measures program runtime and resource usage

Low

wget

kylin-wget

Network download tool, HTTP/HTTPS/FTP file download

Medium

ki18n

kylin-ki18n

Internationalization library, translation framework

Medium

........

........

........

........


Significance of synchronized kernel and user-space transformation

The Rustification of system tools in openKylin 3.0 is not an isolated action, but resonates in sync with the upstream Linux kernel's Rust process:

  • Upstream is advancing Rust drivers and abstraction layers at the kernel level

  • The rust-for-linux repository serves as a technical bridge, continuously tracking upstream progress, ensuring openKylin can absorb upstream Rust achievements as soon as possible

  • openKylin 3.0 takes the lead in implementing the first batch of Rust transformations at the user-space system tool level

By gradually accumulating experience through openKylin 3.0 Rust transformations, we can be more confident in extending Rust capabilities deeper into the kernel and more core system components in the future.


Conclusion

From over 20,000 lines of Rust code in the upstream kernel to the transformation of the first batch of system tools in openKylin 3.0, the system Rustification journey is already underway! If you are interested in Rust or want to participate in the actual development of component Rustification, welcome to join the openKylin community. Whether it's writing code, testing, filing issues, or helping with reviews, every contribution makes the system a bit more "stable."

  • RFL SIG Group Homepage: https://gitee.com/openkylin/community/tree/master/sig/RFL

  • rust-for-linux Project Address: https://atomgit.com/openkylin/rust-for-linux