Now, the reason for not finishing is that I’m basically done! That’s right, GDB has served us reliably for the past few weeks, where we’ve been able to debug our dynamic linker (
ld.so
) and find problems with shared libraries. We got to the point where the amazing @bjorn3 has managed to run his first rust program compiled on Redox using his rustc cranelift backend!While obviously we would’ve found the bugs without gdb eventually, I’d love to attribute enough credit to it that it warrants being posted here!
Redox OS is an operating system written in Rust.
I’m actually really excited for this progress on Redox. I’ve got an old eeepc that I use for os experiments (32 bit unfortunately, so while Haiku works, there are not many apps). Rust is a cool language that doesn’t compromise performance but still adds better safety, and maybe they can get their micro kernel to deliver on the safety/stability potentials of that design.
“At this time, Redox supports:
All x86-64 CPUs.
…”
The have a screenshot of the exact same eeepc running it, so I suppose it builds for that platform, but is not supported.
The EeePC 901 used a 64-bit capable Atom.
Whelp, I guess that’s the end of my eeepc Redox fantasy right there. Oh well…
FortranMan,
There’s tons of merit, I just wonder if it can reach critical mass in order to displace C as a defacto standard for low level systems stuff. I’d say that rust beats C in terms of merit hand down, C is responsible for so many of our problems with insecure code but has long been regarded as good enough and it has such a huge lead that I don’t believe anything else can catch up in our lifetimes. There’s probably a lot of people who’d agree it’s time to put unsafe languages to rest, but like me end up working on legacy code and legacy frameworks because that’s where the work is: the ratio of rust work to C work is minuscule.
Dlang is another contender I really like, but it’s really difficult to get over their decision to require garbage collection. It’s so much better than C, but this is an issue that keeps adoption low for systems work. I think rust would be more approachable/less foreign for developers if it used dlang’s syntax.
Rust has a very nice C FFI. The usual pattern is C library -> unsafe Rust 1:1 mapping -> safe Rust wrapper. For critical pieces of C code you can’t simply replace, that’s a good way to fence them off from the rest of your program.
tidux,
I did that for one project, but I found myself adding many wrappers for c code and also needing to use linux syscalls that rust didn’t have native support for. It’s certainly not ideal and is lagging in support right now. Of course It’s not the fault of rust’s developers, but until they reach critical mass most projects will simply ignore it. I’ve thought about writing my own rust framework to provide everything I want/need, but I’m not sure if I’d really use it enough to make that worthwhile – I don’t have clients lining up for rust development at the moment and I’m trying to get more involved with gpgpu/microcontrollers, which use C/C++.
Edit: I don’t mean to discourage anyone from using it. IMHO anyone learning to program ought to learn rust before C since C is overrated. Hopefully enough people will do that and rust becomes more common.