3 ms·
Thanks for clearing that up. Say, you know a lot of things about the rust ecosystem. Do you have any insight into how hypothetical rust driver code would integr
by kortex 5y ago
Thanks for clearing that up. Say, you know a lot of things about the rust ecosystem. Do you have any insight into how hypothetical rust driver code would integrate with the rest of the kernel build process? I imagine it would have to use llvm-rustc, or is gccrs ready for the job?
Would it be emitting objects that gcc/ld would link against?
- steveklabnik 5y ago> Do you have any insight Well, this is a working patch set, so, yes, though I have no direct involvement and haven't read all of it yet. > I imagine it would have to use llvm-rustc, Yes, it uses upstream rustc. > is gccrs ready for the job? Not yet. They're making great progress, but major chunks of the language are still missing. They'll get there. Using upstream rustc isn't a blocker for new code implementing drivers, but it is a blocker for getting into older drivers, or the kernel. The blocker is platform support; or at least, the current largest blocker, and either rustc will gain it, or gccrs will be good enough to compile this codebase. We'll see :) > Would it be emitting objects that gcc/ld would link against? Yep, it emits output that looks like any C compiler's output, you link 'em together and you're good. If you manage to compile the kernel with clang, in theory you can even get cross-language LTO; this is working in Firefox, but I'm not sure if anyone's tried it with the kernel yet or not.
- xvilka 5y ago> If you manage to compile the kernel with clang, in theory you can even get cross-language LTO. Note, that there is still bunch of unsolved issues [1] in LLVM to allow all building all of Linux kernel. The efforts had stopped for some years but recently gained steam again, though a lot of time was wasted before. [1] https://bugs.llvm.org/show_bug.cgi?id=4068 https://bugs.llvm.org/show_bug.cgi?id=4068