4 ms·
I thought it was going to be some boring material UI screenshots, but this is so much more interesting! Susceptible to the usual C bugs, albeit with minor impac
by sk0g 6y ago
I thought it was going to be some boring material UI screenshots, but this is so much more interesting! Susceptible to the usual C bugs, albeit with minor impact. I thought they were switching most of the kernel and drivers to Rust, for some reason.
Edit: not a Rust fanboy by any means, hell, I've never even opened a Rust file.
- Q6T46nT668w6i3m 6y agoZircon, the kernel, is written in C++. There’s no programming language requirement for components, e.g. the network component is written in Rust.
- est31 6y ago> I thought they were switching most of the kernel and drivers to Rust, for some reason. Note that zircon itself is not allowed to contain any Rust [0]. It's not exactly specified what they mean by the kernel, but it seems that this includes not just the microkernel but also everything that lives in the zircon top level directory, which is enough to boot the system. tokei says there is not a single line of Rust in that entire directory (but about 1 million lines of C/C++). [0]: https://fuchsia.googlesource.com/fuchsia/+/cb20372465f875ff4fbf2a04f0951430207f7b7a/docs/contribute/governance/policy/programming_languages.md#languages-rust-decision https://fuchsia.googlesource.com/fuchsia/+/cb20372465f875ff4...
- sk0g 6y agoI wonder what the ratio of C:C++ is. Sounds like they're using C as a restricted C++ anyway, which is interesting.
- yjftsjthsd-h 6y agoI know what it means to use C++ as a nicer C, but what does it mean to use C as a restricted C++?
- de_watcher 6y agoC as a restricted C++ could be probably something like GLib: a deeply object-oriented library (nowadays C++ isn't about OOP at all though).
- est31 6y agoAs of commit cb20372465f875ff4fbf2a04f0951430207f7b7a, according to tokei, in all of fuchsia there are 792k lines of C, 880k lines of C header, 1.711M lines of C++, 10k lines of C++ header, and 2.585M lines of Rust. In the zircon subdir, there are 569k lines of C, 300k lines of C header and 473k lines of C++.