10 ms·
Show HN: Redox Rust OS – v0.3.3 release
- shmerl 9y agoWill it work with virt-manager, or it requires manual Qemu/KVM setup?
- jackpot51 9y agoI am the creator of Redox OS. It is a microkernel based operating system mostly written in Rust. Please ask any questions or make any comments you have about Redox! EDIT: I am going to sleep soon. I will be up in 8 hours, 7 A.M. Mountain Time.
- piinbinary 9y agoWhat are the most common classes of bugs you observe?
- yjh0502 9y agoCould you write default username/password on a release page? :)
- jackpot51 9y agoI have added it. The username is `user` with an empty password, or `root` with a password of `password`. The only way to change this at the moment is to edit `/etc/passwd`, where they are stored after being encrypted using argon2.
- w4tson 9y agoWhat is your background? Like how many OSs have you written not in Rust?
- jackpot51 9y agoI wrote a toy OS in 32-bit assembler when I was younger. It was terrible. Unikernel, basically, with no memory protection. I then rewrote it in 64-bit assembler, for fun. After learning about Rust, I immediately went to work on Redox. The bootloader and framebuffer initialization code were lifted from the old toy OS's.
- NamPNQ 9y agoI wish to have an OS able to run DirectX same on window :D
- bronz 9y agoi watched an interview you did on a podcast some time ago. i found it to be very interesting! in that interview you said that redox was not going to become a viable desktop operating system for a long time. you seemed to even dismiss the sentiment. is that still so?
- agumonkey 9y agoHow long until emacs ? or I should say remacs (rust ported emacs by Wilfred Hughes :)
- adhambadr 9y agoany plans to port it to mobile phones? If anyone worked on porting a touch-based input drivers I could contribute!
- jackpot51 9y agoMobile phones are extremely diverse. Attempting to target any more than one model would be very difficult, and that one model would need to be owned by all contributors.
- deleted 9y ago[deleted]
- cyber1 9y agoYour works are very amazing! I have three questions :) 1. Could you say your opinion about future of Rust. Will it become mainstream? 2. Pros/cons between Rust and C for system programming? 3. I heard many times that implementation of standart data structures like RBTree, Graphs without recursion traversal in Rust it's very difficult and painful tasks with unsafe hack code. So if i am Rust beginner i should avoid learn this language through implementations my own data structures(BST, AVL, LL, ...)? *sorry for my English. It is not my native language.
- pornel 9y agoNot OP, but maybe can help: 1. I can definitely see its future in drivers, filesystems, codecs (areas where both performance and correctness is required). 2. + Rust has fantastic error handling. No null pointers. Mandatory error checking, but with very light syntax. + Dependencies and modularization in Rust are soooo much easier than in C. + You never have to write `free()` again. + Thread-safety can be guaranteed at compile time. - Significant learning curve. You need to "get" Rust's ownership approach before you even manage to compile a non-trivial program. - It's still "new", so it may be hard to convince people to use it. C is 45 years old, so it seems like a safe bet (it has flaws, but the flaws are well-known). 3. What Rust calls "unsafe" is what all of C is, so it's never worse than C. The idea is that you carefully implement these structures using raw ("unsafe") pointers, and wrap them in a safe Rust API. This way you need get it right once, and rest of the code doesn't have to worry about breaking things.
- empath75 9y ago> You need to "get" Rust's ownership approach before you even manage to compile a non-trivial program. I'm not entirely certain that's true. I wrote a useful (to me) cli script and only have the vaguest understanding of how the ownership model works. I think for text processing sorts of tasks, it's not too difficult to use.
- Mouse47 9y agoBeginners frequently trip over `&str` vs `String`, but other than that I agree w/ you
- nathcd 9y agoIs Orbital the desktop for Redox, or are there plans for a modular DE/WM system where other desktops can be slotted in and selected from the login screen, or wherever? If it is going to be modular, are there any plans for compatibility with Linux DEs?
- jackpot51 9y agoYes, there are plans for others. Orbital is not tied to the lower level framebuffer driver, so it would be possible to write or port other GUI stacks.
- empath75 9y agoHow much unsafe code is in redox and the core utils and what are you doing to ensure that you don't end up with the same bugs in your unsafe code that you find in C codebases?
- eklavya 9y agoI have a question. In the fuchsia/zircon thread some people (committers?) were saying that Rust was not suited and would be difficult. Redox is also a microkernel. So are there any limitations or not?
- jackpot51 9y agoLimitations of Rust or of microkernels? Rust has not impacted development in any negative way. On the contrary, it has been incredibly helpful and has boosted development.
- kibwen 9y ago> In the fuchsia/zircon thread some people (committers?) were saying that Rust was not suited and would be difficult. The only thread that I saw was someone decrying that Zircon was written in C++ rather than C, which later turned into a discussion on Rust. I haven't seen any Zircon committers comment on Rust; can you find the link you're thinking of?
- eklavya 9y agoI may have been mis-remembering. I was hoping to see more Rust in it since it was new.
- cjbprime 9y agoI expect this sort of work doesn't get enough praise because it's just the start of what a full OS would look like, but I think having OS kernels written with more memory safety is awesome and necessary.
- jackpot51 9y agoI believe it is only just beginning. There are only about a dozen regular contributors, which would be very small if comparing with Linux distributions.
- pjmlp 9y agoYes, specially since we already lost many of them since the early 70's, mostly due to politics and bad management decisions.
- jitl 9y agoWhat is the security model of Redox? We’ve heard a bunch recently about the capabilities security model in Fuschia/Zircon, which is the other new operating system that excites me. Can you compare the two?
- jackpot51 9y agoSomewhat capability based. If you do `cat sys:iostat`, you can see part of what I mean. Most operations happen on a file handle which has the properties of a capability. We still need to do more work on it though.
- javajosh 9y agoWhat is the breakdown of the ISO size? It's now 430MB - what are all those bits? (I ask because, as a new OS, I'd expect it to be really tiny since it's so new.)
- jackpot51 9y ago- 64 MB - Preallocated kernel buffers - 256 MB - Live filesystem - The rest - Running applications
- javajosh 9y agoHey there, thanks for the response. Just DL'd the ISO and it's only 38MB. I think there is some ambiguity when you say "Lower Memory Usage" and then talk about "ISO size". I was expecting the download to be 430MB! Also, I ran the ISO in Virtual Box and it's far more than I thought it would be. It's not just a barebones kernel and shell, you actually included a simple window manager and some GUI applications! It booted nice and fast, too. Great work.
- FlyingSnake 9y agoI've been watching Redox on and off since its inception, and I must say I'm really impressed at what it has achieved till now. It is a fully functional OS with binutils, terminal, calculator etc, and this is a win for the whole FOSS culture. What are the potential areas where Redox could be beneficial ? I would love to run on Raspberry pi, older Androids or Routers etc. Is it doable? I'm also curious about the benefits that redox offers vis-a-vis bare metal Linux (Alpine/Void etc)?
- cies 9y ago> I'm also curious about the benefits that redox offers vis-a-vis bare metal Linux (Alpine/Void etc)? Security (Redox' stems form the language, Linux' stems from being widely used). Hackability (smaller, more modern, more hackable language). Simplicity. > What are the potential areas where Redox could be beneficial ? To put apps on VMs with a very tight and secure OS underneath.
- kbr 9y agoI've been seeing Redox develop for a while now, and I've got to say—it's really amazing what such a small group of people can accomplish. They have innovative tools in all sorts of areas of computer science. Including coreutils, binutils, a shell (along with a custom shell scripting language), common GUI applications, a hash function, a file system, etc. One of the coolest aspects of all of these tools are that they aren't exclusive to Redox. In fact, they are rather portable. For example, the new file system (tfs) can run on operating systems other than Redox. One of the team members wrote an "atomic hash table" for it, and it was open sourced as well. It even uses an open source hash function by the same author. Congrats to the team. Writing an operating system is incredibly hard, and it's great to see something like this written in Rust. I'm a big fan of all of the core contributors, and can't wait to see where Redox goes.
- atombender 9y agoI’ve always found it weird that things like file systems in the Linux kernel are so tightly coupled. Why isn’t, say, Ext4 written like a library? (Or is it? I don’t think it is?) Stub out the interface that the kernel needs, and provide an interface for the bits (reading disk blocks and so on) that the file system needs from the kernel. This way, you can decouple it completely from the kernel, test it independently, port it without forking the code, and then it can easily be used in userland, too.
- joshsyn 9y agoThis already done. FUSE
- stevekemp 9y agoThis is the recurring argument about "monolithic kernels" vs "microkernels". In the latter different user-space processes can be used to implement filesystems, networking, etc. There are a lot of small operating systems that take the decoupled route - but you'll almost certainly never see them because they're either research-based, or suffer from the problem of most hobbyist operating systems which is "lack of hardware support". Doesn't matter how modern/sexy an O/S is if you cant run it upon your hardware. (Relatedly once you can run it you need software on it too..) That said there are some compromises available, even with Linux. If you use something like FUSE you can write your own filesystem in 100% user-space - something I've done for a couple of niche applications.
- joshsyn 9y agoAny null pointer deference, overflow so far and how if so?
- jackpot51 9y agoThere have been overflow bugs, usually logic errors during subtraction. I encourage the use of checked subtraction and addition to prevent these from becoming issues.
- wogna 9y agoHow realistic is it to run processes of this OS (like the netstack processes) on top of existing microkernels like minix/QNX/etc. ?
- IshKebab 9y agoVery impressive, but I'm still disappointed they are mostly copying Unix, rather than trying to improve it. E.g. based on the names, the coreutils are identical.
- silly_giraffe 9y agoWhile I completely agree that there are Unix idioms that could go by the wayside, the team is already taking on an enormous project. Reinventing standard practices at the same time (and the ridiculous bike shedding that would ensue) seems like an even more impossible task.
- mmstick 9y agoIf you have ideas, then you should pitch them on the corresponding GitHub projects.
- lproven 9y agoStrongly agreed. Especially since multiple successors to Unix already exist -- notably, Plan 9 and Inferno.
- vbezhenar 9y agoI wonder why Redox has so high requirements, 1GB of RAM looks like a lot for pretty much toy OS. I'm using server running on 256 MB RAM and it's enough for quite a lot of services.
- jackpot51 9y agoRedox can run in 256 MB if it is installed to disk, and is not running the GUI.
- r0br0dz 9y agoHey Ive built it on Voidlinux and ran it with Virtualbox but my touchpad dont work yet with qemu no problems with touchpad. Superb efforts! Great work devs and contribs! Such an enormous task and I hope joy is a result :)