Redox userspace on Linux


I left this uncategorized because it doesn’t really feel like it belong in any one of them.

I’m curious if it would be possible to bolt the Redox user space on top of Linux. The reason for this is that the biggest hurdle is driver support. By still using the Linux kernel we don’t lose out on that, but can still gain the benefits of a rust user land. If this does happen, I think it would attract more development to the user land side of things and those benefits both projects.
My biggest hurdle is relic. Obviously it would kinda of be point less to and the rust user land and still use glibc and since relibc has Linux support it should be possible.

Right now I’m going through Linux from scratch project to learn how a Linux distro is assembled and then I want to start mutilating it. How does one use relibc as a c library? I got it built on my Solus box, but don’t know how to tell gcc or clang to use it.

It turns out google is trying to get the Linux kernel to be compiled with clang/llvm, which would be nice, because it would drop the need for gcc all together, but as for now I’m still going to need it to at least be a cross compiler. Also, I would have to set up rust cross compile, which with google shouldn’t be that hard.

Anyone else interested?



Sounds like an interesting project. I’ll follow your progress with interest…



Great idea, redox would benefits of another test case for userspace working over another kernel. Also relibc needs testing (I think is embedded inside gcc custom build, it’s implicitly linked afaik).



I got relibc to compiled. It produces static libraries. Now I just need yo figure out how to compile c code against them.

I got lfs built and almost booting. I’ve learned a lot from going through the book. Once I get it booting I’m going to work on creating a x86_64 relibc linux target.



I was thinking about making pure Rust target with relibc but it doesn’t seem quite ready just yet and I don’t have time and skills to alone implement what is missing.
One day openlibm could be replaced by libm from Rust language nursery.

I’d start with creating relibc Rust target and cross compile binaries from x86_64-gnu. It should be pretty easy to do and Rust test suite can discover a lot of issues.



Rine is not an emulator. It is a system call translator for Redox binaries
that runs on Linux. But hey, if it makes you feel better:
“®edox (i)n a(n) (e)mulator” is fine too.

1 Like


I’ve always thought the other way around. I feel like if you want people to try and use Redox as a daily driver it needs to be able to support the tools people are already using.



That’s what relibc allows. It’s a posix c library. The point of this indevour was to try and drop the redox user land on top of linux so hardware support wouldn’t be as much of an issue. That is people could just worry about building the core system in rust.