|
|
Subscribe / Log in / New account

Rust is the future of systems programming, C is the new Assembly (Packt)

Rust is the future of systems programming, C is the new Assembly (Packt)

Posted Aug 30, 2019 12:53 UTC (Fri) by lzh (guest, #134122)
In reply to: Rust is the future of systems programming, C is the new Assembly (Packt) by josh
Parent article: Rust is the future of systems programming, C is the new Assembly (Packt)

In my simple and exprimental project (https://github.com/lizhuohua/linux-kernel-module-rust), I implemented a simple driver for the Ethernet controller used on raspberry pi 3, based on Geofft's amazing project (https://github.com/fishinabarrel/linux-kernel-module-rust). And I found that the performance impact is actually negligible. However, I found the following problems:

1. Linux kernel doesn't guarantee API/ABI stability, so it's hard to design a universal Rust interface. At least it is almost impossible to make it work on all versions of Linux.
2. Many C language features have no corresponding Rust support. For example, it seems like impossible to construct a struct with bitfields.
But yes, I believe Rust is a promising language for kernel programming. Let's join forces to make this happen!


to post comments

Rust is the future of systems programming, C is the new Assembly (Packt)

Posted Aug 30, 2019 15:36 UTC (Fri) by josh (subscriber, #17465) [Link]

> 2. Many C language features have no corresponding Rust support. For example, it seems like impossible to construct a struct with bitfields.

That's one of the items on the FFI working group's list to work on.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds