ToaruOS-NIH: ToaruOS with no third-party components
Posted: Tue Jun 05, 2018 3:40 am
A few years ago, after giving a talk about ToaruOS, someone came up to me and expressed some disappointment that ToaruOS used Newlib as a C library and employed Cairo and FreeType in its userspace. If it wasn't all entirely from scratch, they lamented, was it really my own OS? While I think their conclusion was a stretch, those comments have eaten at me in the back of my head for years, and with my work on mainline ToaruOS winding down after the release of 1.0, I thought maybe it was finally time to address them.
ToaruOS-NIH is a ToaruOS distribution with no third-party components. While the kernel remains mostly untouched (some PCI Database headers have been removed, and there was a general restructuring and deduplication of headers and datastructure implementations between the kernel and userspace), a lot has changed in the userspace. Gone is Newlib, replaced by a (very incomplete) in-house C library. Gone is Cairo, with the compositor now using its own SSE-accelerated alpha blitting as an extension and improvement on the existing ToaruOS graphics library (other consumers of Cairo were mostly Python applications that are still in the process of being rewritten, or were trivially replaced with the native graphics library). Gone, too, is FreeType, replaced with a very special text rasterization method. At the moment, Python is also missing - currently due to incompleteness of the C library, but also as I wanted to take this opportunity to port some of the more important functionality that was originally implemented in Python back to C for performance reasons, and to make it more widely accessible to C applications throughout the OS. Finally, GRUB has been replaced by a purpose-built in-house bootloader, though not much focus is placed in this area and it remains limited in its hardware support.
But ToaruOS-NIH is more than just removing third-party libraries. As functionality has been ported from Python to C, many improvements have been made to the operating system as a whole. The window decorator now includes context menus. New window management options have been added. Clipboard support is now present in the compositor, with the terminal supporting text selection. With the complete nested menu library ported from Python, applications like the terminal also have a menu bar available. ToaruOS-NIH also includes a completely new build system, which is much faster and better organized than the original ToaruOS build process.
Ultimately, the goal with ToaruOS-NIH is to replace the core of ToaruOS and eventually support all of the applications that were previously ported to the Newlib mainline distribution.
PS: With this announcement, ToaruOS is migrating to GitLab from Github.
ToaruOS-NIH is a ToaruOS distribution with no third-party components. While the kernel remains mostly untouched (some PCI Database headers have been removed, and there was a general restructuring and deduplication of headers and datastructure implementations between the kernel and userspace), a lot has changed in the userspace. Gone is Newlib, replaced by a (very incomplete) in-house C library. Gone is Cairo, with the compositor now using its own SSE-accelerated alpha blitting as an extension and improvement on the existing ToaruOS graphics library (other consumers of Cairo were mostly Python applications that are still in the process of being rewritten, or were trivially replaced with the native graphics library). Gone, too, is FreeType, replaced with a very special text rasterization method. At the moment, Python is also missing - currently due to incompleteness of the C library, but also as I wanted to take this opportunity to port some of the more important functionality that was originally implemented in Python back to C for performance reasons, and to make it more widely accessible to C applications throughout the OS. Finally, GRUB has been replaced by a purpose-built in-house bootloader, though not much focus is placed in this area and it remains limited in its hardware support.
But ToaruOS-NIH is more than just removing third-party libraries. As functionality has been ported from Python to C, many improvements have been made to the operating system as a whole. The window decorator now includes context menus. New window management options have been added. Clipboard support is now present in the compositor, with the terminal supporting text selection. With the complete nested menu library ported from Python, applications like the terminal also have a menu bar available. ToaruOS-NIH also includes a completely new build system, which is much faster and better organized than the original ToaruOS build process.
Ultimately, the goal with ToaruOS-NIH is to replace the core of ToaruOS and eventually support all of the applications that were previously ported to the Newlib mainline distribution.
PS: With this announcement, ToaruOS is migrating to GitLab from Github.