Mozilla’sRust languagewas conceived by its designers as a way to write many kinds of software quickly and safely — including full operating systems.

Over the last several months a team of developers has been busy doing just that: using Rust to create Redox , a full-blown Unix-like operating system designed as a radical rethinking of the Linux approach.

Clean slate

Redox uses Rust for its kernel-level code to provide more memory safety considerations than C allows by default. But the project doesn’t simply rewrite Linux in a new language. Redox discards at least as much from Linux’s version of the Unix tradition as it keeps.

As explained in the project’s wiki and design documents , Redox uses a minimal set of syscalls — a deliberately smaller subset than what Linux supports as a way to avoid legacy bloat. The OS also uses a microkernel design to keep things slender, in contrast to Linux’s monolithic kernel.

Many of the OS’ internal behaviors have also been rethought. Unix and Linux both use the notion of everything being a file . Redox goes a step further and treats everything like a URL , making it simple to register handlers for events and providing a consistent way to perform other kinds of abstractions.

Redox, written in Mozilla’s Rust language, has a minimal feature set compared to Linux and breaks from many of Linux’s traditions, including licensing, kernel design, and APIs.

The plan, though, is not to replace Linux , but to provide a useful alternative that can in time run Linux software as-is. There are already a few hints of this: Many common Unix (and thus Linux) commands are already supported, and there’s a work-in-progress port of the ZFS file system as well.

Another radical break from Linux isn’t in the software but in the licensing: The entire project is MIT-licensed and not GPL. The rationale is that the MIT license encourages downstream adoption far more readily than GPL, "since downstream is what really matters: the userbase, the community, the availability."

The long road ahead

Even though .ISOs of Redox can be downloaded and booted, you aren’t likely to ditch Linux for Redox in production any time soon.

For one thing, Redox is untested, with many missing features and a great many incomplete ones. Redox’s developers also admit that it won’t be possible to establish "complete 1:1 Posix compatibility" (because the OS omits many Unix syscalls), so existing Linux software will probably need a support layer on Redox to run — a roadblock to its adoption.

Linux’s legacy code base also won’t be easily shrugged off. Decades of development and thousands of man years of work have been invested in it and the C language development environment. The Rust language, by contrast, has only existed for a few years, and only very recently reached a state of stability sufficient for most people to build large, ambitious projects with it.

Still, a project like Redox is valuable. If Redox can make good on its promises of being more secure by design, many of the embedded-device scenarios currently targeted by Linux might be better served by Redox. Mozilla has already talked about Rust as a language for Internet of things devices, so this would be a natural extension.

Redox can also serve as an example for approaching operating system issues differently, exerting long-term evolutionary pressure on Linux. If Linux isn’t going anywhere — and all signs show it isn’t — then it’s best to find ways to force it to become better.