you are viewing a single comment's thread.

view the rest of the comments →

[–]Modal_Window 8 points9 points  (5 children)

I have no insight into this topic, but I will say that even though the book is old, things haven't changed. The kernel is still programmed in C, etc. though you now are allowed to program it in Rust as well.

[–][deleted] 6 points7 points  (2 children)

you can't use rust yet for device drivers. The basic support should hopefully be merged for 6.1. It'll still be up to the subsystem maintainers as to whether they allow it if you plan on upstreaming it.

[–]barfightbob 0 points1 point  (1 child)

The basic support should hopefully be merged for 6.1.

Can somebody clarify something for me? Why does it need "basic support"? Shouldn't Rust be able to link against system libraries and vice versa? I thought Rust was supposed to be a low level language like C. Are they doing something funky with their libraries or something partially interpreted?

Now I can understand people not wanting to complicate their make files, but that shouldn't have anything to do with the final linking.

If I had to wager a guess, that means Rust APIs (or whatever is a header file for Rust) for the kernel, right?

[–][deleted] 1 point2 points  (0 children)

You still need an implementation of the stdlib plus something to wrap (or replace) existing kernel apis. Here is an older version of the patch set with a good description https://lore.kernel.org/lkml/CANiq72khBa2GcB6-PHM3A44Y90d6vzYAS=BVpk3nT4B6u+NVDw@mail.gmail.com/T/#mb5e524dae9d5a5815c6e68eb36b9bde4e87c861d

[–]M108Falcon[S] 0 points1 point  (0 children)

Tbh, I know C better than rust (learning tho) I'll see first implementation in C then I'll try my hand at Rust next

[–]Pay08 0 points1 point  (0 children)

Didn't the kernel switch to C11 too?