5 ms·
Yeah, Redox is a completely new, from scratch, OS written in Rust. Ironically, even the libc is written in Rust. It (occasionally) runs on real hardware, and I
by tormeh 6y ago
Yeah, Redox is a completely new, from scratch, OS written in Rust. Ironically, even the libc is written in Rust. It (occasionally) runs on real hardware, and I believe they're pretty close to bootstrapping, although lack of a browser is a rather big obstacle
- jarym 6y agoImpressive! World is about to find out how many bugs Rust will prevent from arising vs those OS writing in something else
- diydsp 6y agoRust is not supernatural. It addresses limited classes of bugs. Techniques to mitigate bugs in other languages have been developing rapidly. Bugs are not the only determinant of success.
- brundolf 6y agoDidn't realize it doesn't really run on hardware yet. Still impressive, though Will they refuse to ship any userland code that isn't written in Rust (a browser, for example)? Writing a whole new browser from scratch in Rust would be almost as big a task as the OS itself. Practically speaking, it could make more sense to port an existing one over to their (already POSIX-compatible) environment.
- Ericson2314 6y agoNo see my other comment https://news.ycombinator.com/item?id=24448512 https://news.ycombinator.com/item?id=24448512 . Not only do they support Unix interfaces, but you can even use a non-Redox-specicific package set with just a few tweaks.
- SAI_Peregrinus 6y agoIt does run on real hardware, it's just very limited. Graphics card support is quite basic, it can't boot from a disk with a partition table (so the current ISO image uses a bootloader to load the filesystem into memory and emulates one), only the rtl8168d and e1000d Ethernet controllers are supported, and there's no USB HID or mass storage support so you need a PS/2 mouse & keyboard.
- mark_l_watson 6y agoDoes it run on VirtualBox? That would be the way I would kick the tires, see what it is like.
- SAI_Peregrinus 6y agoHaven't tried it, but probably. I know it can run in qemu.
- kruxigt 6y agoTalking about ironic, Rust is often mentioned as the language Mozilla invented to write exactly that - a browser..
- brundolf 6y agoSure, but it's a ton of work either way and probably outside the scope of what this project wants to tackle
- vbezhenar 6y agoIt is ironic, that writing OS is easier than writing a browser.
- mkl 6y agoThat hardly seems ironic. Operating systems have been around for several decades longer than web browsers, and many are orders of magnitude simpler.
- ithkuil 6y agoIndeed you could write an order of magnitude simpler browser, and also write the web pages it could render. Probably most people wouldn't bother using it since they want to read some other, legacy web pages (you know, to pay their bills, shop online, check the weather forecast, book their flights). The analogy with operating systems is not silly, actually. Operating systems have indeed benefited/suffered from the network effect caused by "content" (programs). OSs were indeed becoming also feature-rich bahemoats that are hard to recreate faithfully enough in order to run that legacy stuff.
- Matthias247 6y agoOperating system is imho a rather wide term. There is not that much to a simple operating system. They are mostly a scheduler. Manage some tasks, have the ability to switch between them - that's it. Things like FreeRTOS are not a lot more. However when people refer to Windows or macOS as OS, they also include the whole collection of standard software as part of the OS. Control panels, browsers, GUI frameworks, etc. At that point it probably includes a browser
- GordonS 6y ago> However when people refer to Windows or macOS as OS, they also include the whole collection of standard software as part of the OS. Control panels, browsers, GUI frameworks, etc I'd add hardware drivers to that list too. Many are of course written by 3rd parties, but to the average consumer they are "part of the OS".
- 6y ago
- p1necone 6y ago"the libc is written in Rust" This is cool, are there any downsides to calling Rust code from C? I guess it's basically a black box that behaves like a regular C library from the outside?
- davidhyde 6y agoNo downsides except that the public rust function needs to be decorated with the #[no_mangle] attribute for it to be consumed by a c or c++ codebase.
- _-___________-_ 6y agoIt is a regular .so (what I assume you mean by "C library"), not a "black box that looks like a regular .so". There's no runtime wrapped around your code like with Go etc. You just need to add an attribute to tell the compiler not to mangle your names, similar to what's needed for C++ / C interop.