soulserv.xyz

[ Home ] [ About ] [ Gitea ] [ GitLab ] [ GitHub ] [ Contact ]

Project Updates, WebKit2GTK Debian Packages and Other Cool Stuff

Published on the 22nd of September 2021.

Vimb: the ultimate browser.

I've been very vocal on how web browsers are broken. Luke Smith words it better than I do. But it's not all doom and gloom. Besides Gecko and Chromium there is one (somewhat) sane engine left: WebKit.

Specifically, on Linux we have WebKit2GTK which is the GTK port of Apple's WebKit browser engine. It is free and open source software, and does not use any modern soydev languages like rust or go for its codebase. Nope, this baby is written in C++, with some parts being in assembly for their JIT JavaScript engines, more on that later.

Vimb is an excellent vim-like browser that is extremely minimal in codebase yet fully-featured, written completely in C, and uses WebKit as its engine. To say I fell in love would be an understatement. I am actively adding features and patches to vimb, and you can too! It's one of the nicest features of having a small, well-written, and self-explanatory codebase.

This image has been jpeg'd to hell to save you some bandwidth. You're welcome

Click here for a full sized non-jpeg'd image

But there's more to this than just minimalism, WebKit in fact the only browser engine that supports the modern web and also works (in its latest releases) on x86, x86_64, ppc64le, ppc64, and ppc (not sure about any others). This matters to me because my main machine is a Talos II Lite, a modern PowerPC machine, and I also often use my PowerMac G5 and my PowerBook G4; don't blame me for liking non-Intel machines :P

The only issue with WebKit is that its JavaScript engine is not optimized using assembly for any PowerPC architecture, which means it reverts to using C code for JavaScript. Firefox does that too, and Chromium barely works on PowerPC (last I checked it had issues displaying most text), so no big loss here as long as it performs well right? Except it doesn't perform very well out of the box, so I decided to apply some optimizations to WebKit2GTK: Level 3 (-O3), Link Time Optimization, processor tuning (-mtune & -mcpu), and to my surprise it did make a big difference.

I also decided to do the same optimizations for x86_64 because I can, I will host the debian packages soon in case you want to try them out. If you don't trust me you can also use the provided "rules" file to replace the "debian/rules" file that is used to build .deb packages. It's not the cleanest but it works. The hosting will go up as soon as I figure out how to run an Apache server or something similar.

Project Updates:

Also related to vimb: xfce4-dwm has been modified to work better with vimb+tabbed, making tabbed act like a terminal that can swallow windows. This is useful because my vimb config has an option to press Ctrl+n and open the current webpage in netsurf, so instead of opening in a new separate window, it takes over the current vimb window making things more seamless.

Again related to vimb: I forked tabbed and added a simple patch to fix some misbehavior with vimb, and I also made it act more like a regular tabbed application: Tabs go from left to right, not the other way around, text is more legible, and Ctrl+Tab and Ctrl+Shift+Tab work as expected now.

Finally, now that I am mostly set-up in terms of my machines and configuring the software on them, I can go back to focusing on FPGAs and such, I have a big project coming up and I can't share any details just yet, but stay tuned!