News for hackers. Stuff that matters.
Re:Writing an OS in Rust: Advanced Paging by std_throwawayay on Monday January 28, 2019 @11:03AM (#19018482)
I think none of your points are really set in stone.

* The kernel already contains some C++ which (if you ask C programmers) is not C. And many C programmers are more likely to accept Rust than having to deal with C++.

* AFAIK there is not gcc front-end for Rust yet but LLVM tools can compile the kernel, too. When Rust stabilizes gcc support may come, too.

* The barrier for entry could be lowered by using Rust for Rust programmers if it is employed in some specific modules. The resulting code could be more clear. Not everything in the kernel is pointer pointing and bit shuffling.

* The number of architectures that Rust supports are growing daily.

Re:Writing an OS in Rust: Advanced Paging by milkey_mouse on Monday January 28, 2019 @12:59PM (#19019511)
> The [Linux] kernel already contains some C++

Are you sure? I don't think the kernel even compiles with a C++ compiler [1]. Also, I just ran cloc on my linux repo and didn't get any actual C++ code.

Perhaps some external kernel modules are written in C++, but that seems like a bad idea too [2].

[1] https://www.phoronix.com/scan.php?page=news_item&px=45-Linux... [2] https://www.threatstack.com/blog/c-in-the-linux-kernel

Re:Writing an OS in Rust: Advanced Paging by std_throwawayay on Monday January 28, 2019 @01:08PM (#19019606)
That [1] was what I remembered. They were preparing for C++. But obviously it didn't get as far as actually including C++ code in the mainline kernel. Maybe it was a preparation in order to allow experimenting with C++ in the kernel.
Re:Writing an OS in Rust: Advanced Paging by jononor on Monday January 28, 2019 @12:53PM (#19019466)
Where in the (mainline) kernel is there C++ code?
Re:Writing an OS in Rust: Advanced Paging by std_throwawayay on Monday January 28, 2019 @01:03PM (#19019551)
I could swear that I read that they start allowing some C++ contributions. But with a search in the kernel source I could not come up with any evidence. If there is any C++ code in the kernel they hid it well.
Re:Writing an OS in Rust: Advanced Paging by scoopr on Monday January 28, 2019 @01:34PM (#19019834)
You may be thinking of GCC
Re:Writing an OS in Rust: Advanced Paging by porpoisely on Monday January 28, 2019 @08:53PM (#19023012)
Pretty sure the linux kernel is exclusively C. Actually the major OS kernels are pretty much all C - Windows, FreeBSD, MacOS and other BSD derivatives. The GNU software and utils could be written in C++.
Re:Writing an OS in Rust: Advanced Paging by int_19h on Monday January 28, 2019 @10:23PM (#19023440)
MacOS is not a BSD derivative when it comes to kernel.

And I'm pretty sure Windows has some C++ in kernel space. It might be limited (no exceptions etc), but that's another matter.