I don't know of such a Rust kernel being worked on that is not some hobby side project but something more like Servo was, where you have paid experienced in domain developers.
I don't know of such a Rust kernel being worked on that is not some hobby side project but something more like Servo was, where you have paid experienced in domain developers.
https://www.linuxfoundation.org/press-release/linux-foundati...
But if Walmart needed a kernel for some reason, and it would provide value to them, they could afford it, it's about a quarter's worth of profit. But, again, Linux would likely do anything they needed, and if it was missing something they could add it.
the actual cost is in person-years of work, not dollars, and even then you can only speed up the time it takes so much by throwing money at the problem.
This is highly unintuitive. I don't understand how Windows's Explorer (the file manager) has been for many years and is still to this day vastly inferior to Dolphin, a Linux file manager made for free by five Dutch guys or whatever. I can think of many other examples.
If anything, it seems like more money results in less quality, by way of some tragic sociological paradox. :p
You do not need to get all Linux features at start, I would focus on the server stuff, support the popular server hardware and popular server work so filesystems and networking. I would hope some competent developers would write a new kernel from scratch then getting 10% of some Linux rustiffied. When you edit shit you need to make sure not break shit, so you are limited, you move slow and you have to implement backwards compatibility. Amazon,Google,Facebook could work on this if they care for security but probably using VMs is cheaper for them.
Not that I think it would make the point of having a bright new kernel easily compete with such a huge and firmly grounded project as Linux though.
All the more, there already are multiple projects using Rust to build OSes out there, if I'm not mistaken.
The exception to this is when you can develop something and have a good case to use it yourself, like Google and Fuchsia. But I doubt Fuchsia will gain wide organic adoption because of the same factors.
This would mean that the only OSes are first created by hobbyists, then fanboys use it then a company adopts it. But there are commercial OSes and commercial software that are created by a company to solve a problem and not by random dudes and companies then adopts it.
IMO is sad that we the tech industry are stuck with old OSes and old architecture while you have this giants that use open source software to make billions and they could find researching and creating of a few new revolutionary OSes like it happened in the past. And I don't mean desktop OS that will defeat Windows.
Vendors aren't going to write drivers for your hobby kernel. No one is using your hobby kernel. Bootstrapping a new kernel without billions of dollars to invest in development time is almost impossible, and anyone who is investing billions of dollars is likely going to have dubious proprietary reasons for doing so.
A successful kernel is Rust is probably the worst thing that could happen to the open source community.
But if you are Google and you believe that this Rust kernel is super safe and fast and has clean code, and parallelism,async and candy ... how many drivers do google Data centers use ?
After you prove the kernel is real good by using it in data centers and devices that need security you can slowly expand, for most devices you could create soem compatibility layer. Who knows if there are soem competent developeres hired to work on it they might use some better architecture, like keep the drivers outside the kernel.
Even if kernel devs are careful to avoid the usual pitfalls, it's just a bad API that encourages use of null-terminated strings elsewhere. If you're using other, better string types elsewhere, you often need to make copies to then make system calls (the article hints at that with the addition of a CString type).
Null terminated strings are a poor choice to converge on for high level application code in particular. It's just an inefficient (expensive substrings, redundant length calculation, unclear ownership) and unsafe default for too many use cases.
I don't mind certain performance sensitive applications using C strings to avoid extra registers, though even that is a premature optimization in certain situations.
[1] See Limitations: https://en.m.wikipedia.org/wiki/Null-terminated_string
There are also other reasons why having the length embedded in a string (or a string slice) is a good thing. You might want your “str_contains” function to do something different with different sized inputs: doing some vectorised lookup might only be worth it at a certain point, or if the length of the needle is greater than the haystack itself then there isn’t much point doing anything.
NULL terminated strings are a huge mistake that brings in security issues, needless copying and inefficient code that might contain several redundant strlen calls at different levels.
- you can't assume inline storage of the substring, which is more efficient, because that'd mean overwriting the parent string with a size field
- you might free the parent string early unless you keep around a reference to it, which is more expensive
- usually strings (esp. substrings) aren't that long, and for very long ones you can use a different data structure
As an example: why can a process only have one current working directory? Wouldn't it be nice to be able to have a process maintain pointers to two or more locations in the filesystem at once? Wouldn't it make software more modular if a library could "chdir" into some directory without worrying about breaking the application that depends on it? The filesystem APIs could be extended with a "CWD" handle argument that can be passed around sort of like a file descriptor instead of having one implicit CWD for the whole process.
The same could be done with UIDs. Why not have processes that can use multiple UIDs? Again, you could have UID parameters to API functions that require authorization.
POSIX is pretty good by the standards of 80's computers, but in a lot of ways it's showing its age. We can do better. But it's kind of depressing that OS interface design is treated as a solved problem, and so those interfaces stagnate.
Why would you even want a working directory at that point?
I think the idea of a current working directory is a reasonable one, it's just that the limitation that a process can only have one CWD at a time is kind of arbitrary when you think about it.
I could even see having commands that take multiple CWDs. Like a move operation could take a source and a destination CWD as an alternative to specifying source and destination paths.