The Linux 6.8 kernel is scheduled to include the first network driver in the Rust language

The net-next branch, which develops changes for the Linux kernel 6.8, includes changes that add to the kernel the initial Rust wrapper above the phylib abstraction level and the ax88796b_rust driver that uses this wrapper, providing support for the PHY interface of the Asix AX88772A (100MBit) Ethernet controller. . The driver includes 135 lines of code and is positioned as a simple working example for creating network drivers in Rust, ready for use with real hardware.

The functionality of the Rust driver is completely equivalent to the old ax88796b driver, written in C, and can be used with X-Surf 100 network cards equipped with the AX88796B chip. Both drivers, C and Rust, will coexist in the kernel, and can be included depending on user preference. To enable the Rust driver, Kconfig provides the AX88796B_RUST_PHY setting, along with which you also need to enable the Rust binding over phylib using the RUST_PHYLIB_ABSTRACTIONS parameter.

In addition, the Realtek Generic FE-GE Ethernet driver was developed in the Rust language, which has not yet been proposed for inclusion in the kernel. Previously, a prototype of the rust-e1000 driver for Intel Ethernet adapters, rewritten in Rust, was also presented.

Source: opennet.ru

Add a comment