Write kernel code with rust?

Song Baohua 2021-10-14 04:50:00

We are not sure RUST The final trend in the kernel , How many people are willing to move , But at least Linus Willing to test the water .

Wedson Almeida Filho in the light of ARM PL061 GPIO drive , Translated a RUST edition , This is also a RUST Real driving cases . The code is long , You can read in detail :

https://lwn.net/Articles/863459/

Here we only extract a small part of the comparison , such as C Version interrupt service program :

c24eb8064b43c3d4fc5e365696eb27c3.png

Corresponding RUST Interrupt service routine :

9dfa5d4257a935b5f53c61a3d547070d.png

such as C Version of amba_driver:

9119d52020c88398316aca7127629d56.png

RUST Version of amba_driver:

41779406590d9283f70d124d51460626.png

You are willing to move to RUST Write kernel code ?

Please bring the original link to reprint ,thank
Similar articles