![]() ![]() A compiler running doesn't have to concern itself with memory alignment, nor if the parameters passed were stack based or register based. Thing is if C++ is so suckage, then how come you need C++ to write the compilers to compile the kernel?īecause writing something that will run in ring-3 versus something that runs in ring-0 on the processor are different enough to be significant for the question you bring up. Rust is just 'doing it the hard way' for mostly NIH reasons, it seems to me. Uplifting that stuff to an improved C is easier than starting again. Realty is we have real big corpus of nice things like GNU and Linux in C and a huge set of mature really good tooling around C. However its NOT 1972, and its not 1992, its not even 2002. If it was 1972 and not 2022, I'd probably be saying Rust is really groovy-mannnn. Don't read that to say Rust is bad from a technical perspective, those are mostly negatives only in the context of already have existing ecosystems. For application layer stuff having to have yet another run time is PITA. The syntax is not really an improvement, the learning curve for using it well seems to be pretty steep. I have looked at Rust quite a lot and frankly I just don't see what is compelling about it besides the safety elements. It is however way easier then inventing and instructing people in an entirely new language, and replacing or adding an entirely separate tool chain to mature projects like Linux. I am not going to pretend that last part is easy. Create a C or 'C with Classes' dialect that adds some bounds checked array/vector types with iterators and then sit down and think really hard about what changes need to be made to casting, promotion, and void pointers. The sensible thing to do is not re-invent the wheel here make sure whatever you do is linker compatible with C. If you want a systems language that readable an approachable for beginners we already have it - its 'C' or possibly 'C with Classes' Rust kernel documentation and samples Further reading: Linux 6.0 Arrives With Support For Newer Chips, Core Fixes, and Oddities ![]() Rust crates and bindings for initial minimum viable build ![]() Kbuild infrastructure (Rust build rules and support scripts) Kernel internals (kallsyms expansion for Rust symbols, %pA format) The initial support of Rust-for-Linux comes in roughly 4 areas: Simple score bug drivers#Kernel, with many more interfaces (and drivers - NVMe, 9p, M1 GPU) on the way. Simple score bug code#The contents are the absolute minimum to get Rust code building in the Practice once this initial infrastructure series lands. Our plan is for the tree to switch to the standard non-rebasing Miguel is the primary maintainer, with me helping where needed/wanted. It's been updated based on feedback from the Kernel Maintainer's Summit, and to gain recent Reviewed-by: tags. Simple score bug update#"This Monday, the first set of patches to enable Rust support and tooling was merged for Linux 6.1," writes Slashdot reader sabian2008, sharing an update from longtime kernel developer Kees Cook: The tree has a recent base, but has fundamentally been in linux-next for a year and a half. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |