All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Comparison of Rust and C in Kernel Development

By

chmaynard

11mo ago· 11 min readen

Summary

The article discusses the comparison between writing Rust and C in the kernel, focusing on a Rust version of a driver for an embedded Ethernet controller. It highlights the differences in syntax, types, and APIs used in Rust compared to C.

Key quotes

· 3 pulled
At slightly more than 100 lines, it's about as simple as a driver can be, and therefore is a useful touchstone for the differences between writing Rust and C in the kernel.
Looking at the Rust syntax, types, and APIs used by the driver and contrasting them with the C version will help illustrate those differences.
Readers who are already conversant with Rust may find this article retreads some basics, but it is my hope that it can still serve as a useful reference.
Snippet from the RSS feed
In 2023, Fujita Tomonori wrote a Rust version of the existing driver for the Asix AX88796B em [...]

You might also wanna read