OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Jul 23, 2018 9:47 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: ToaruOS-NIH: ToaruOS with no third-party components
PostPosted: Tue Jun 05, 2018 3:40 am 
Offline
Member
Member

Joined: Wed Mar 30, 2011 12:31 am
Posts: 231
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.

Image

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.

_________________
gitlab | twitter | ToaruOS | PonyOS 5.0 | ToaruOS-NIH - a completely-from-scratch ToaruOS distribution


Top
 Profile  
 
 Post subject: Re: ToaruOS-NIH: ToaruOS with no third-party components
PostPosted: Tue Jun 05, 2018 11:29 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 488
I have to admit that I sometimes thought about ToaruOS: The user-space is nice but except for the compositing system, it is all ported and the system-level stuff is nothing special. However, your NIH port proves that wrong. It is a very impressive amount of code that you produced there; I have much respect for the NIH port. I'm especially impressed that you could replace Cairo and FreeType without affecting visual quality. How does the performance of your own graphics routines compare to Cairo's and pixman's optimized routines?

Also: Is there any image one can download to test the NIH port? Gitlab is very slow right now, probably because of increased traffic caused by recent Github announcements...


Top
 Profile  
 
 Post subject: Re: ToaruOS-NIH: ToaruOS with no third-party components
PostPosted: Mon Jun 25, 2018 7:42 pm 
Offline
Member
Member

Joined: Wed Mar 30, 2011 12:31 am
Posts: 231
I'm happy to announce that ToaruOS-NIH's C library has reached the point where we can build Python again, including support for the ctypes module. Even the Yutani (windowing system) bindings are working.
Korona wrote:
How does the performance of your own graphics routines compare to Cairo's and pixman's optimized routines?
Poorly, I'm afraid. Cairo does some really amazing tricks to ensure efficient rendering, and I'm not quite there yet.
Korona wrote:
Also: Is there any image one can download to test the NIH port? Gitlab is very slow right now, probably because of increased traffic caused by recent Github announcements...
I have a new build with Python available here - it's a bit big and takes some time to boot.

_________________
gitlab | twitter | ToaruOS | PonyOS 5.0 | ToaruOS-NIH - a completely-from-scratch ToaruOS distribution


Top
 Profile  
 
 Post subject: Re: ToaruOS-NIH: ToaruOS with no third-party components
PostPosted: Tue Jun 26, 2018 10:26 pm 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 488
I checked it out and the performance seems to be good on my machine. Only when I start >4 of those plasma demos, compositor lag becomes an issue (i.e. it gets noticeably slower to move around windows). That's better than I expected - I suspected that it would be very hard to beat Cairo. Certainly very nicely done.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: pharos and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group