Earlier quoted context omitted.
sigh... Linux is going to survive. And no it does not need to be re-written from scratch in Rust. Someone lied to you at the church of rust.
But its a fun thing to do, and that's a good enough reason to do it. After all is that not exactly how Linux came into being anyway.
Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
131–140 of 196 posts
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#132Author here. I'm surprised to see my hobby project on Hacker News. I know this kind of stuff spark the ``it's meaningless to rewrite everything (especially Linux) in Rust'' debate. I agree 100% that rewriting Linux in Rust (or your favorite language) is just a waste of time and such a project won't live long. That said, what I'd say here is that it's fun. Really fun. Implementing ABI compatibility requires you to und…
> You can learn how printf(3) works. You can learn what happens before main().
Yes! It's such a wonderful experience. This is exactly what I most enjoy doing, just seeing how things work, maybe making my own version. I hope you have lots of fun.
You're reimplementing Linux's kernel-userspace binary interface, right? The system call interface is stable and language agnostic, it's really nice. Some pointers for anyone who'd like to know more:
https://man7.org/linux/man-pages/man2/syscalls.2.html
https://man7.org/linux/man-pages/man2/syscall.2.html
https://github.com/torvalds/linux/blob/master/Documentation/...
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#133Earlier quoted context omitted.
Mach's internals didn't follow the Unix model, and was by almost any metric a failure. There have been several other "real micro kernel based OS based on a message passing core", and they too, by almost any metric, have been a failure. Process scheduling in Linux in 2021 is far, far ahead of anything in any other OS, ukernel or MP-based. The idea that there hasn't been progress in this area is really completely absur…
> "real micro kernel based OS based on a message passing core", and they too, by almost any metric, have been a failure. BeOS wasn't half bad. The failure was probably mostly commercial. It is true that they moved their networking stack into the kernel, but it's not entirely clear to me that they had to do that, it was just the most expedient way to get acceptable performance and stability given the (programmer-time)…
Fair point. You could probably say this of other attempted microkernels too, to be even fairer. But that doesn't really change the fundamental point that just cooking up "a better OS design" doesn't lead to it being successful. There's a lot more in play that "mere quality".
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#134Earlier quoted context omitted.
> I know this kind of stuff spark the ``it's meaningless to rewrite everything (especially Linux) in Rust'' debate. I agree 100% that rewriting Linux in Rust (or your favorite language) is just a waste of time and such a project won't live long. Considering that this is exactly how Linux was born (just a hobby project for fun), I wouldn't assume so fast that it's useless. Moreover, you don't need to justify yourself…
I don't see why we need to pretend that every hobby has the potential for greatness. Being a hobby is a good enough end to itself. In fact in this instance I think it's a little disingenuous to quote Linux and say it could happen again. The industry is totally different now. There's much more competition than there was when Linux was released and that competition is much more mature too. Plus the bar for a production…
Indeed, there's a word for it which I find particularly lovely, autotelic.
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#135Author here. I'm surprised to see my hobby project on Hacker News. I know this kind of stuff spark the ``it's meaningless to rewrite everything (especially Linux) in Rust'' debate. I agree 100% that rewriting Linux in Rust (or your favorite language) is just a waste of time and such a project won't live long. That said, what I'd say here is that it's fun. Really fun. Implementing ABI compatibility requires you to und…
* Some people bake bread even though there's a good bakery nearby.
* Some people grow gardens even though there's a farmers' market down the street.
* Some people restore old cars even though there's a good restoration professional in town.
* Some people make k8s clusters on rpi even though they could rent that for cheap.
You're making an OS that's linux compatible even though there's already linux. And that is awesome!
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#136Rewriting the Linux kernel in rust would be a rehash of why we ended up with Linux in the first place: rewriting an older OS from scratch. I would love to see a solid implementation of a real micro kernel based OS based on a message passing core in Rust to become a viable alternative to the now 50 year old Unix architecture. This would give us a possibility of some real progress on the security and process scheduling…
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#137Author here. I'm surprised to see my hobby project on Hacker News. I know this kind of stuff spark the ``it's meaningless to rewrite everything (especially Linux) in Rust'' debate. I agree 100% that rewriting Linux in Rust (or your favorite language) is just a waste of time and such a project won't live long. That said, what I'd say here is that it's fun. Really fun. Implementing ABI compatibility requires you to und…
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#138Earlier quoted context omitted.
> "real micro kernel based OS based on a message passing core", and they too, by almost any metric, have been a failure. BeOS wasn't half bad. The failure was probably mostly commercial. It is true that they moved their networking stack into the kernel, but it's not entirely clear to me that they had to do that, it was just the most expedient way to get acceptable performance and stability given the (programmer-time)…
> BeOS wasn't half bad. The failure was probably mostly commercial. Fair point. You could probably say this of other attempted microkernels too, to be even fairer. But that doesn't really change the fundamental point that just cooking up "a better OS design" doesn't lead to it being successful. There's a lot more in play that "mere quality".
you did say "by almost any metric".
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#139Author here. I'm surprised to see my hobby project on Hacker News. I know this kind of stuff spark the ``it's meaningless to rewrite everything (especially Linux) in Rust'' debate. I agree 100% that rewriting Linux in Rust (or your favorite language) is just a waste of time and such a project won't live long. That said, what I'd say here is that it's fun. Really fun. Implementing ABI compatibility requires you to und…
The permissive license would also be interesting in some applications.
Re: Kerla: Monolithic kernel in Rust, aiming for Linux ABI compatibility
#140Very cool! I think a killer feature would be to emulate the Linux kernel device driver model such that existing C driver modules could be used with Kerla. Further, borrow (no pun intended!) the Linux device driver Rust wrappers from the Rust for Linux kernel project to then enable writing Linux device drivers in Rust. The question is whether emulating the Linux device driver model (by which I kind of mean mimicking t…
Linux drivers don't have a fixed ABI (or even API), making such a feat somewhere between hard and impossible. You'd have to constantly play catch up with the latest kernel refactorings, which would require a tremendous amount of engineering effort. Heck, it'd probably be easier to emulate the Windows driver architecture - at least those have proper ABI compat.