Verso: A new browser based on Servo

Wu Yu Wei published on
4 min, 771 words

Yep, I'm building a new web browser called Verso based on Servo. If you don't know what is Servo yet, it's a web engine written in Rust from the ground up. I think it would be cool to see a browser that's built on top of it instead of creating yet another chromium fork. I also have personal milestones want to achive. One of them is buildint the UI from Servo itself. Right now I can already render two views: One for the webpage, the other for the navbar UI. The image below is the Verso window navigating the demo page:

I know it's still a bit rough but what I want to showcase is that the navbar can already perform some basic actions. There are still a few blockers I prefer to resolve first before improving the UI. Like I said I would like to dog food eating which should look inside both Verso/Servo and improve them. Here are some list served as my remainder and hopefully attract some contributors to help as well.

Multi-Windows

Last year, I spent a lot of time to look into multi-views support. And thanks to Delan from Igalia, it's added in Servo this Januaray. So the next milestone would be adding multi-windows support. I have some idea but not sure how to execute yet. Servo's compositor only accept one rendering context at the moment. With multiple windows, I believe there will be multiple contexts need to handle. Another restrcition is the embedder couldn't access to the compositor directly despite they are in the same thread. They use channels to communicate with each other. I'm thinking maybe I should implement another compositor as experiment to see how it goes.

Better IPC

The navbar UI I showcase in the image above is essentially a web page as well. The embedder sends events and receives messages with existing channels. For example, the UI may send the message by prompting a dialog. But instead of actually showing the dialogs, the embedder will process the message and perform actions like navigating the URL and minimize/maximize the window. But there are some advanced features that current event variants couldn't satisfy them, such as changing the history session and reflect to the input bar. We could try to add more variants but some may contain security violation concerns. Perhaps Servo can public the DOM module in scritp crate. And we add a custom DOM API similar to postMessage that only accpets special origin like about:.

Multiprocess

Servo actually has multiprocess mode but it only supports Linux and macOS. I feel like multiprocess is a must have feature after Spectre. At least we should provide some basic site isolation. It would be great that Windows can get the benefits too. To achieve this, we will need to fix this issue: ipc-channel#310 which is caused by this panic. Another good to have is sandboxing but gaol hasn't supported Windows yet either. We should either add the support or see if there are other crates already add the implementation like AppContainer.

Flatpack Support

Linux remains as the most difficult target when it comes to packaging. There are so many distributions and package formats. We also have to worry about both X11 and Wayland at the same time. Althouh Servo has a book to get started with the setup, it still lists lots of dependencies compared to other platforms. I think we should figure this out in the first place, writing Flatpak manifests to clearify the dependencies, and make the final packaging easier to distribute.

Looking toward the future

There are more items in the roadmap but I guess these milestones will take quite some time already. I have to say I'm more and more excited to the Verso project as I engage into the Servo community deeper. Nico from Taffy is also trying to add flexbox support to Servo and it looks pretty promisng! I believe we can see a web browser that's made in Rust in the foreseeable future!