For years now, Google has been developing Fuchsia, an operating system that is distinctly not based on Linux. The latest proposal for Fuchsia OS shows how this “not Linux” operating system could run “unmodified” programs for both Android and Linux.
One of the bigger issues with making a new operating system, particularly one that’s being built from scratch like Fuchsia, is that people will rightfully want to be able to run their favorite apps on that OS. In the case of Fuchsia, which could theoretically serve as the successor to both Chrome OS and Android, people would likely expect to be able to run both Android apps and Linux apps, along with native Fuchsia apps.
Up to now, the expectation was that Fuchsia could accomplish this in the same way that Chrome OS is currently able to run Linux apps, by running a full instance of Linux in a virtual machine. Chrome OS is even set to use this same strategy for its ability to run Android apps, thanks to a project called arcvm.
However, there are some downsides to the virtual machine approach. For one, managing files between the “host” (Fuchsia, for example) and the “guest” (Android) can be tricky or cumbersome. Additionally, Fuchsia puts an emphasis on security, attempting to keep programs isolated from one another wherever possible. To maintain that level of isolation with Linux apps, Fuchsia would need to run more than one virtual machine, which could bog down performance.
This week, a proposal has been put forward for an alternative solution for Fuchsia to run programs meant for Linux and Android. Instead of running Linux itself, Fuchsia would gain a system called “Starnix,” which would act as a translator between instructions for the Linux kernel and instructions for Fuchsia’s Zircon kernel.
Essentially, Linux programs would run “as normal,” none the wiser to the fact that it’s not running in a Linux-based OS. All the while, Starnix would do the work of making sure that the app is able to function on Fuchsia just like it’s supposed to on Linux. If you’re at all familiar with how Linux works, the full Starnix proposal is an interesting read, particularly their plans to support Linux “as she is spoke,” meaning preserving every quirk or obscure behavior.
What’s more interesting to those with a casual interest in Fuchsia is precisely how the developers intend to use Starnix. On multiple occasions, the proposal speaks of using Starnix to run code from Android directly on Fuchsia.
As we expand the universe of software we wish to run on Fuchsia, we are encountering software that we wish to run on Fuchsia that we do not have the ability to recompile. For example, Android applications contain native code modules that have been compiled for Linux. In order to run this software on Fuchsia, we need to be able to run binaries without modifying them.
For example, we will run some low-level test binaries from the Android source tree as well as binaries from the Linux Test Project.
From this, we can see that Google may be intending for Fuchsia to be able to deeply support Android apps, with no exceptions needing to be made, such as for apps that use the Android NDK to write in C or C++. Of course, in the long run, Starnix should only be used as a stopgap measure to allow Google’s Fuchsia OS to be more broadly usable while waiting for developers to port their apps to the new OS. In almost every situation, a native Fuchsia app should perform better than a Linux or Android app running through Starnix.
That said, Fuchsia’s Starnix is only in the proposal phase, with a significant amount of work needing to be done to have anything resembling proper Android/Linux to Fuchsia/Zircon compatibility. To try and avoid the pitfalls of such an undertaking, Google has been studying the success and failures of similar projects such as the original Windows Subsystem for Linux (WSL1). However, it’s still quite possible for this proposal and effort to fail and for Fuchsia to fall back to using virtual machines for its Linux and Android needs.
If the addition of Linux and Android compatibility to Fuchsia sounds intriguing, Google has recently opened the project to contributions from the open source community.
More on Fuchsia:
- Google is opening Fuchsia OS development to the public
- Google certifies Fuchsia OS’s ‘Sapphire’ through Bluetooth SIG
- Fuchsia Friday: ‘Nelson’ and ‘Luis’ may point to 2020 Made by Google devices
FTC: We use income earning auto affiliate links. More.