HomeTech NewsProgramming with Rust for the FreeBSD kernel

Programming with Rust for the FreeBSD kernel

Published on

- Advertisement -

Writing drivers in Rust instead of C? After Linux, this should now also be possible in FreeBSD.


FreeBSD developer David Young has written code that allows kernel modules for FreeBSD to be written in Rust instead of C. The reasons for this are the same as for the Linux kernel, which is soon to receive official Rust support: Like C, Rust allows low-level programming, but offers modern protection mechanisms against many programming errors that easily occur in C – especially memory errors, which are responsible for many vulnerabilities in software are responsible.

- Advertisement -


The crate (Rust’s nickname for library) kernel-sys provides Rust bindings for the FreeBSD kernel header files, which define the kernel interfaces for drivers. The crate bsd kernel provides abstractions that make for a more Rust-friendly API. A very simple demo module shows that writing BSD drivers in Rust basically works with it. The next step must now be the development of a simple, useful kernel module in Rust, writes Young.

Young provides the code with a concise guide on GitHub. In the blog post Writing FreeBSD Kernel Modules in Rust he explains his reasons and the technical details.

- Advertisement -

- Advertisement -

Latest articles

China will “reborn” in chip industry after US restrictions, says Huawei

Eric Xu, rotating president of Huawei, believes that the Chinese semiconductor industry will be...

iPhone 15 Pro will include glove-sensitive buttons with customizable sensitivity adjustment

The news about the next star device from Apple, the iPhone 15 Pro continues...

More like this