In the net-next branch, which develops changes for the Linux kernel 6.8, updates have been made to add an initial Rust wrapper over the phylib abstraction layer. This wrapper is used by the ax88796b_rust driver, which provides support for the PHY interface of the Asix AX88772A Ethernet controller (100MBit). The driver consists of 135 lines of code and is positioned as a simple working example for creating network drivers in Rust, ready to be used with real hardware.
In terms of functionality, the Rust driver is fully 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 the C and Rust drivers will coexist in the kernel, and can be enabled based on user preference. To enable the Rust driver in Kconfig, the AX88796B_RUST_PHY configuration option is provided, alongside which the RUST_PHYLIB_ABSTRACTIONS parameter should also be enabled to include the Rust wrapper over phylib.
Additionally, an Ethernet driver for Realtek Generic FE-GE has been developed in Rust, which has not yet been proposed for inclusion in the kernel. A prototype of the rust-e1000 driver for Intel Ethernet adapters, rewritten in Rust, was also previously introduced.
Source: opennet.ru
