19 ms·
Redox – A Unix-Like Operating System Written in Rust
- freekh 11y agoLooks real cool. Congrats! Wonder if some of the utils like the shell would be a cool Rust project for me :)
- freekh 11y agoLooks real cool. Congrats! Wonder if some of the utils like the shell would be a cool Rust project for me :)
- terda12 11y agoNot a fan of the name, sounds too much like Redux :/
- conradk 11y agoFirst commit for Redox was April 20th 2015. First commit for Redux (the JS library, if that's what you're talking about) was May 30th 2015.
- 746F7475 11y agoIf no one knows about your project it's name doesn't matter. Bring to mind the old MikeRoweSoft vs. Microsoft thing.
- pjc50 11y agoPresumably named after the redox reaction that causes iron to rust.
- iagooar 11y agoThe name is quite clever, actually.
- Sharlin 11y agoYes indeed. * There's the Unixy "x" suffix * Iron turning to rust is a redox reaction * Redo means "do again (differently)" * Redox is an almost-homophone with redux meaning "revived"
- hamburglar 11y agoPlus the "iron" / "bare metal" imagery for running directly on hardware as opposed to on top of some other layer. Redox puts rust on metal.
- Zecc 11y agoAm I the only one reminded of a certain energy drink?
- ape4 11y agoNot that it matters... Apparently rust-lang is named after the rust fungus not the chemical reaction. https://en.wikipedia.org/wiki/Rust_%28programming_language%29 https://en.wikipedia.org/wiki/Rust_%28programming_language%2...
- kibwen 11y agoThat hasn't stopped anyone from naming tons of Rust libraries after elements and chemistry terms, just like the true etymology of "Python" hasn't stopped people from naming things after snakes. :P
- systems 11y agosound a lot like redo x nobody likes to redo things .. or x'es would you ever redo your x
- khattam 11y agoYes... that's what x'es are for.
- yuchi 11y agoI’m not into OSes but I have to say it looks incredibly interesting and makes me want to dig the codebase. Awesome brand also!
- qz_ 11y agoI'm pretty impressed that 37 people are capable of writing an entire OS with a gui in under a year. Looks really cool.
- teamhappy 11y agoOperating systems aren't that big, and if you know your stuff, I'm sure it's not too hard to pull off. Here's an example I borrowed from StackExchange: According to cloc run against 3.13, Linux is about 12 million lines of code. 7 million LOC in drivers/, 2 million LOC in arch/, and only 139 thousand LOC in kernel/. (http://unix.stackexchange.com/a/223753 http://unix.stackexchange.com/a/223753) Edit: Would be nice to have the numbers for the latest Minix release for comparison. Does anybody know how big their core team is? (The kernel is something like 15k LOC IIRC.)
- Manishearth 11y agoBtw, if anyone is interested in learning how to write an OS, and interested in Rust, check out https://intermezzos.github.io/ https://intermezzos.github.io/. It's a "learning OS" in Rust, with a companion book. Incomplete, but a good start.
- caipre 11y agoThis looks outstanding, thanks for the link.
- steveklabnik 11y agoProject lead here. I haven't had time in the last few weeks to work on this, so the book is pretty far behind the kernel itself at the moment. Playing the long game. I was hoping to do some more today, in fact...
- BinaryIdiot 11y agoIt looks really interesting! I'm going to be looking at it probably next weekend :)
- chillingeffect 11y agoOh man if we could get hard realtime scheduling in early, large, critical embedded systems like medical would benefit greatly!!!$$$
- jeffreyrogers 11y agoDoesn't that exist with something like FreeRTOS?
- chillingeffect 11y agoYeah it looks good for realtime, but i'd like to use rust and gnu/linux/posix utilities. Do you know much abt filesystems on freertos?
- TickleSteve 11y agothere are many, many RTOSes out there, most very well battle-tested. There really isn't a need for any more.
- 0xcde4c3db 11y agoWhile I'm not sure this fits with Rust's existing concepts of safety and correctness, it would be interesting (and not just for RT purposes) to have a language in which one could mark functions as <= some complexity (given the usual simplifying assumptions) or provably terminating, and have the compiler throw an error if it can't prove that those constraints are met. Does something like this exist?
- abiox 11y agoi don't know, but wow, that's a really cool idea.
- Rusky 11y agoThe closest thing that comes to mind is total functional languages- the compiler doesn't deal with complexity classes, but it does prove termination. It's mostly used in dependently-typed languages and theorem provers so they can prove the type checker will terminate.
- deleted 11y ago[deleted]
- progman 11y agoGreat news! Now it's worth to learn Rust just to keep up with this project. Does Redox run in qemu only or also in VirtualBox? I tried it with all devices (USB, Network, etc.) disabled. Installation from ISO to /dev/sda worked fine but after reboot I got a hangup: "IDE Primary Master: Unknown Filesystem". Do I have to format the hardisk image with ZFS before installation?
- jszymborski 11y agoThe book has steps, but I think it runs through qemu
- Nullabillity 11y agoThe installer worked under VirtualBox for me.
- stryan 11y agoqemu is recommended but Virtualbox is supported. Try running grabbing the latest source and running make virtualbox.
- fpoling 11y agoSo I can play with it on OSX ?
- progman 11y agoThanks for the recommendations! First I have to install the current Rust version. Are there any MD5/SHA256/GPG to verify the integrity? Rust's download page doesn't provide anything like that. https://www.rust-lang.org/downloads.html https://www.rust-lang.org/downloads.html
- steveklabnik 11y agohttp://static.rust-lang.org/dist/ http://static.rust-lang.org/dist/ has them. If you use multirust to install, and you have GPG installed, it will use them to check upon installation.
- fche 11y agoHow many "unsafe" declarations should one expect in regions of the code that will need to deal with untrusted data (like networks, syscalls)?
- progman 11y agoI guess not very much if Redox will support open hardware. http://www.xda-developers.com/risc-v-cores-and-why-they-matter/ http://www.xda-developers.com/risc-v-cores-and-why-they-matt... http://hackaday.com/2014/08/19/open-source-gpu-released/ http://hackaday.com/2014/08/19/open-source-gpu-released/ http://www.openfpga.org http://www.openfpga.org http://hackaday.com/2014/08/19/open-source-gpu-released/ http://hackaday.com/2014/08/19/open-source-gpu-released/ http://open-ethernet.com http://open-ethernet.com Some compelling projects (GPU) failed for lack of interest. The concepts behind those projects did not fail because most of the projects were isolated. The best time for open hardware is yet to come. Redox could accelerate that.
- fche 11y agorust "unsafe" is not about proprietariness of the hardware. It's about doing lower level operations that, in order to express, the rust compiler's safety logic must be disabled.
- progman 11y agoYou are right. Barebone stuff is usually unsafe. The point I'm trying to make is that open hardware could also be programmed in Rust, reducing the number of "unsafe" blocks in user applications. Software for proprietary hardware is usually written in unsafe C/C++.
- greydius 11y agoI think what you're trying to say is that architecture-specific code will be isolated in unsafe blocks. That's not necessarily true, as a lot of safe code can definitely benefit from knowledge of the underlying metal. I'm thinking of scheduling in particular.
- amelius 11y agoI was reading this: http://www.redox-os.org/book/book/design/urls_schemes_resources.html http://www.redox-os.org/book/book/design/urls_schemes_resour... and I really got interested in the "everything is a URL" idea. But then I noticed that the most important parts of this text were missing :/ Perhaps somebody can clarify here.
- Manishearth 11y agoThere's a bit more info here: https://github.com/redox-os/redox/wiki/URL https://github.com/redox-os/redox/wiki/URL
- rch 11y agoInteresting. They mention 9P, but their approach reminds me of 1060's NetKernel: http://www.1060research.com/products/#roc http://www.1060research.com/products/#roc
- amelius 11y agoVery interesting. The only odd part is that the modules (drivers) themselves are not referenced by URL, but only by a simple word (in the example "port_io"). Also, I wonder how we could combine drivers. For example, (theoretically) instead of using "https" as driver, we could compose it as "HTTP over TLS over TCP", and change any of those subcomponents as desired. With URLs this might become clumsy.
- XorNot 11y agoIt depends how you want to express the hierarchy - URLs say "this is my transport system, and this is my address". But you could propose doing: tcp+tls+http://www.some.url/?options=here http://www.some.url/?options=here if you were okay with that. The problem creeps in when that tls fragment needs options and a path of it's own.
- chei0aiV 11y agoHurd translators can do that easily.
- yincrash 11y agoI wonder why they decided to write their own coreutils instead of using https://github.com/uutils/coreutils https://github.com/uutils/coreutils
- steveklabnik 11y agoThat project is attempting to re-create GNU-style coreutils, they wanted a slimmer, BSD style one, from what I understand.
- deleted 11y ago[deleted]
- dschiptsov 11y agoUNIX98, POSIX compliance?)
- unsignedqword 11y agoApparently not http://www.redox-os.org/book/book/introduction/what_is_redox.html http://www.redox-os.org/book/book/introduction/what_is_redox...
- jpgvm 11y agoThe Rust implementation of ZFS interests me greatly. Going to pull this down and try hack on it.
- jorgecastillo 11y ago>Microkernel Design Stooped reading right there!
- skoink 11y agoI've seen this project a few times - very impressive work! It'll be awesome to see if they can get it self-hosting (right now, I think you need to compile with a different OS).
- deleted 11y ago[deleted]
- b3h3moth 11y ago"Using Rust for an Undergraduate OS Course"[0] is an interesting reading about Rust, OS and C. [0] http://rust-class.org/0/pages/using-rust-for-an-undergraduate-os-course.html http://rust-class.org/0/pages/using-rust-for-an-undergraduat...
- nailer 11y agoAnyone have screenshots of the orbital GUI?
- Manishearth 11y agoThere are some redox screenshots here: http://www.redox-os.org/news/ http://www.redox-os.org/news/
- ethanbond 11y agoI'm also curious how to contribute to the GUI. I'll trawl the github in the meantime but if anyone happens to know a good point to start I'd love to hear. Edit: Found it, in case anyone else is interested: https://github.com/redox-os/redox/blob/master/CONTRIBUTING.md#other https://github.com/redox-os/redox/blob/master/CONTRIBUTING.m...
- hnmcs 11y agohttps://www.google.com/search?tbm=isch&q=rust+redox+gui https://www.google.com/search?tbm=isch&q=rust+redox+gui led me to multiple interesting websites tweak the terms for more results, of course
- iso-8859-1 11y agoIt is a shame that OS development is so dependant on toolchains that whatever focus an OS may have, it excludes other areas of development. For example, I very much like Genode. But to redo Genode in Rust would probably be harder than making a Unix-clone. Safe language or safe API's, it seems like you have to choose one.
- cgcardona 11y agoPrevious Discussion: https://news.ycombinator.com/item?id=10295187 https://news.ycombinator.com/item?id=10295187
- jeffdavis 11y agoWhat is the main differentiator? Security/stability because it's written in rust?
- mastax 11y agoMaybe in 10 years. Right now it's more interesting/unique because it's written in Rust.
- chris_wot 11y agoI feel silly I haven't o ask this, but what is the best guide to learning rust?
- steveklabnik 11y agoI am biased, but the book is the most complete resource: https://doc.rust-lang.org/book/ https://doc.rust-lang.org/book/ There's also http://rustbyexample.com/ http://rustbyexample.com/
- chris_wot 11y agoHey, thanks :-)
- Animats 11y agoVery nice. It was time to do this. There are three near-term products to develop on this: - A small router (home/small office, not data center) - A DNS server - A BGP server Those are standalone boxes which do specific jobs, they're security-critical, and the existing implementations have all had security problems. We need tougher systems in those areas.
- nickpsecurity 11y agoI was worried a whole UNIX might be too big a project so I gave him old school recommendations before. Essentially told him to make a split system that lets you run on tiny kernel bare metal, run UNIXy apps with different API, and let them communicate through some IPC mechanism. That way, like security & MILS kernels, people can write security critical components in isolated partitions with checks at interfaces. Already done with Ada and embedded Java. Rust is best one to try it with now. Far as your recommendations, I like those. I'll add a web server, Redox or UNIX compatible, that's efficient enough to be deployed in all these web-enabled embedded devices. The dynamic part can just be Rust plugins or something. However, just a robust Ethernet stack, networking stack, time API, and simple filesystem could be used to implement all of yours, the web server, and more. So, I encourage people building these OS projects to stay on 80/20 rule hitting features almost all critical things use. Others can jump in at application layer from there.
- burfog 11y agoIn other words, like GNU HURD. That design is very very hard to make correct and fast. Correctness suffers because the UNIX API has all sorts of interactions between different parts. This includes atomicity. It's a bear to get this right with IPC. Performance suffers because you are unable to effectively share data structures. This too relates to the interactions between different parts of the UNIX API. Look, there is a reason GNU HURD is slow and suffers from incompatibility. It's a cute thought experiment, dominating academia around 1990, but it's not actually fast or maintainable. Experience has proven this.
- bsder 11y ago
- tbolt 11y agoAwesome. Really great to see this. Nice work to everyone involved
- tbolt 11y agoAwesome. Nice work to everyone involved
- tomlong 11y agoSo this is like Hurd, right?
- FlyingSnake 11y agoThis is bloody Brilliant! The Rust community is doing a great job in delivering great projects. Are there any concepts borrowed from past OS experiments like Plan-9, Midori, BeOS etc?
- nickpsecurity 11y agoI like the home page: unusually good choice of attributes for a security or reliability-focused OS. The path usually not taken. So, for those familiar, what milestones has the project achieved since we last discussed it here? Note: Best bang-for-buck will be getting solid networking, filesystem, time API, and crypto lib in there. People can crank out purpose-built appliances or VM's for all Internet or Web servers with... not ease but easier. 80/20 rule always best for OSS projects to get adoption & contributions up. ;)
- clem16 11y agoThat looks impressive. It looks very clean and well put together. I will have to check this out!
- kpozin 11y agoI've been looking through some of the kernel code [1] out of curiosity, and I'm very surprised to see that most components have almost no internal documentation — minimal file and class comments, and even fewer inline comments. Is this typical of code for something as complex and central as an OS kernel? Are the developers planning to go back later and add documentation, or is the expectation that anyone who might need to work with this code will find its structure and details intuitive? [1] https://github.com/redox-os/redox/tree/master/kernel/ https://github.com/redox-os/redox/tree/master/kernel/
- kibwen 11y agoThere appears to be a book that serves as documentation, though I don't know how complete it is: http://www.redox-os.org/book/book/ http://www.redox-os.org/book/book/
- tinco 11y agoYes, I like to read sources of big projects as a relaxing activity and almost never is documentation written in a way that a newbie can immediately catch up. The best projects will have a README.md in every directory that explains what a component or namespace is about, or nice big documentation headers. In my experience though if you really want to contribute the lack of documentation is only a small hurdle. If the code is well written then just following the code from the entrypoint on will give you a very good idea about what's going on. All the files and their names should make sense in under an hour or two. In my opinion documentation is most important for external consumers of APIs who don't want to spend time grokking the code, and for explaining design decisions. For contributors it would be code quality.
- deleted 11y ago[deleted]
- jaltekruse 11y agoI only took a brief look over the code to try to find what documentation is actually there, but I managed to find this https://github.com/redox-os/redox/blob/master/kernel/fs/url.rs#L107 https://github.com/redox-os/redox/blob/master/kernel/fs/url.... On your question of how typical a lack of system-internal documentation is in systems projects, the answer from my experience is unfortunately more common than it should be. There are a bunch of usage and design patterns that cannot be expressed regardless of the language you are using. I know very little about Rust, but I work mostly in Java, which is safer than many other languages (less flexible than interpreted or dynamic languages, less dangerous than C/C++). Even java, which has interfaces and strict typing can save you some of the more mundane unit tests and input validation code, has a bunch of design patterns on top of the core language. Projects could serve themselves well to document their code well to allow new contributors to look at any of the code and reasonably modify it to fix a bug or add a feature.
- pointfree 11y ago"MIT licensed" ...and consequently limited driver support. Copyleft is permissive. There's no need for non-copyleft licensing unless you want restrictive proprietary licensing somewhere or sometime.
- ci5er 11y ago"Limited driver support", here, means ... you don't have access to, and the right to fork, the source code? As an old engineer, to me, limited driver support always meant: "not that many drivers". You seem to mean: "I can't fork". Or am I mis-reading you? Many of those of us in the new-new world of next-gen system-integrators-acting-like-new-software-product-developer types don't always have sole control over the drivers in the/our stack necessary to deliver key features to key clients. The "hard" open source position of the copy-left crowd incentivizes old-school pragmatic management to take a "why bother" stance and instead of open sourcing 80% and getting yelled at because it isn't 100%, just go with 0%. Which is sad. An unnecessary. The won't deal with the very real business risk that happens when you liberally treat with zealots. Or am I (I ask again) mis-reading you?
- lolidaisuki 11y ago80% isn't any better than 0%.
- YngwieMalware 11y agoBeautiful piece of work. Thank you to the whole development team
- IshKebab 11y agoWhy create a new Unix-like OS? Sure, have a Unix compatibility layer, but there are so many ways to improve on Unix. Seems stupid to repeat the mistakes of the past.