Published on

Servo Reboot: where are we now? OSS-NA 2024

Authors

It's been close to 1.5 years since Servo has been restarted by Igalia. How is Servo doing? What are our plans? Lots of people have been curious about what's happening with the project since we restarted. Last month I was in Seattle to present our work at the Linux Foundation's Open Source Summit.

If you prefer watching video over reading, here is the recorded talk. It's a link that will redirect you to the Youtube.

Recorded talk of Servo Reboot: where are we now?E

Talk slides and minutes.

open source summit north america 2024 slide-1

Intro: Hi everyone, my name is Rakhi Sharma and I am here today to talk about servo after it was restarted in January 2023.

open source summit north america 2024 slide-2

Even before I start talking about Servo a bit about me, I am Rakhi. I'm open source engineer working on Servo project. I work at Igalia on web platform team. I'm also a Servo technical steering committee member and you can find me on Internet by Atbrakhi.

open source summit north america 2024 slide-3

So for the people who are not aware of Servo. What is Servo? Servo is a web rendering engine that is written in Rust. It has webGL and webGPU support and it is adaptable to desktop, mobile and embedded application.

open source summit north america 2024 slide-4

Servo's project had a long journey. It started back in 2012 at Mozilla Research. You might know it was written in Rust, but why? And what is the story behind? At Mozilla Research there was a team working on Rust programming language and there was a team working on Servo project, and both of them were working closely, Servo will use Rust programming language. Feedbacks will be exchanged between the team and then the Rust programming team would improve based on that. Rust project went ahead and became a mature programming language while Servo was also on its way to become a mature rendering engine, I would say setbacks.

If you are active in Rust community or even in browser world, you would know around 2016/2017, Servo was really doing great and it was on its way to really become a mature rendering engine. But in 2020, Mozilla's layoff impacted the whole Servo team, as the team was laid off.There were few people from the core team, who were trying to maintain the project in their personal time. But if you are working in open source community, you know that the personal time is not enough.

In 2020, Servo project joined the Linux Foundation and in 2022 talks about restarting Servo started. But how? Who will start this project? Because if you're talking about any open source project, it just doesn't need engineers but also needs funding, it needs new contributors and it needs lots of people, right? So in 2023 a team was formed and it was restarted at Igalia. But why Igalia started this project? Who are they?

open source summit north america 2024 slide-5

Igalia is an open source consultancy founded in 2001. It has 140+ people working fully remote from close to 25 countries and it has flat structure, cooperative like model and they are the top contributors in Chromium, Webkit and Gecko. This last point is really important because when we are talking about Servo, the rendering engine, it is huge. If you think of browser, you think of rendering engine. Because without a rendering engine, what even is a browser right? So Igalia has lots of experience. They had people who have like decades of experience working on rendering engine and browser. They had people working on not just rendering engine but browser itself. So I personally couldn't think of a better fit for Servo project to restart at.

open source summit north america 2024 slide-6

After we restarted the project in January 2023, we made an announcement post and it was pretty much very well received by the community.

open source summit north america 2024 slide-7

In this one image I see lots of emotions. I see some people are very surprised that Servo is back. Some people are like, Is Servo dead? Is it alive? So lots of emotions and just in one image. Overall it was very well received by the Rust community as well as the open source community itself.

open source summit north america 2024 slide-8

So Servo in 2023 when we restarted Servo, we thought what are the things we want to work on? First half of the year we worked on taking the project out of the maintenance mode and doing some outreach work. Because if there is no outreach work, how would you know that project has restarted, right? And the maintenance work meant updating the dependencies, updating docs, wiki, moving to the stable rust. That was very important for us because we wanted to make it easy for other people to use Servo or contribute to it. We also worked on layout engine, adding many CSS features. We built internal WPT and Servo demos and as well, we also did quite a lot of embedding work. I'm going to talk about all these points in detail in the next slides.

open source summit north america 2024 slide-9

So let's let's take it 1 by 1, restarting Servo; if you see the graph you will see that Servo had a downtime after 2020, in 2023 it started to move up and we had close to 2500 commits, 1000+ pull request and 53 unique contributors. And this is already a huge thing because it was in maintenance mode for three plus year and we had 50 plus unique contributors there. We improved docs and the wiki to make it easy for other people to come and contribute. And not just Servo project, but any open source project without contributors is pretty much nothing. It's safe to say you can't move an open source project forward if you don't have contributors.

open source summit north america 2024 slide-10

we wanted to provide a way for people to simply test Servo feature. So we built lots of demos. We built this website and we moved all the demos. Right now there are two ways to test Servo, if you are someone who loves to build things and set up things, you can just clone the Servo repository and set it up locally and run. Other option is to go to Servo website servo.org and download Servo from there. Once you download the application, just open demo website and click on one of the demos. We have Webgl demos, web GPU demos. In the image you see only four demos but there are many of them, you can also open this in Firefox or Chrome and compare screen to screen.

open source summit north america 2024 slide-11

After building Servo demos, we worked on internal WPT dashboard. This was important for us track how we are doing in terms of web platform test and in next slides you will be seeing more of these graphs and hopefully that will make it more straightforward for you to understand why it was important.

open source summit north america 2024 slide-12

Later we had to make a choice between layout engine. So if you're not aware, Servo has two layout engine. Right now we are using layout2020 as default and I will be referring it as new layout engine and the layout 2013 as legacy. We are very close to removing the legacy layout completely. we had to make a choice because we were small team and with a small team you can't maintain both, it would have been hard to continue adding features to both layout. We did a layout engine report and if you're curious about how we came to the conclusion of moving with layout2020 report is available on Servo GitHub wiki as well as on Servo website.

open source summit north america 2024 slide-13

Floats is something that is used in almost every website. You can open a website and you can see if floats is not supported right away. So in the graph here, you can see once we added the float support wpt test went up. This is again our internal web platform test dashboard. The red line you see is the legacy layout.

You can see floats was supported and close to 40% web platform tests were already passing in legacy layout and in April 2023 we had less than 20% of the WPT test passing for the new layout. We started working on it around mid june. In September we enabled it by default, right now we have close to 90% of floats test passing in Servo layout engine.

open source summit north america 2024 slide-14

After floats we also worked on another big feature that was adding support for tables and adding support to tables meant getting the Space Jam website running correctly. If you're a Space Jam fan, this is for you.

open source summit north america 2024 slide-15

Addling table support also meant we are passing quite a lot of web platform test. Again the red one is the legacy layout and the blue one is the servo layout. Once table support was close to stable, we enabled it by default. So, now you can see that we have crossed the legacy layout and we are close to passing 62% of wpt for tables.

open source summit north america 2024 slide-16

While we were adding new features to the layout continuously, many other things were also being worked on like sticky positioning, vertical align, text align and also we are doing some big refactorings including migrating the floating point coordinates to fixed point coordinates. This will help us avoid lots of web platform test failures. And also one of the reasoning behind this was that the old layout is using the fixed point coordinates that is app units.

open source summit north america 2024 slide-17

There has to be a way for other people to test/embedd servo and hence we decided to work on embedding part of the Servo. How we can make it easier for other people to embed Servo? There were lots of work already going on in servo around embedding in 2019-2020 but it needed more work. So the idea was simple; to make it easy for other people to use Servo and also to have Servo running on the embedded device like Raspberry Pi 4. If you are someone who is interested in embedded device and how servo is being embedded there, you should definitely visit us at Igalia booth because we have Raspberry Pi 400 and 500 running Servo there.

open source summit north america 2024 slide-18

When it comes to embedding servo, this has been a request from community for so long. So, Servo has been around since 2012, and if you see in the bottom right corner of the image you will see someone has asked about embedding servo eleven years ago, we are in 2024 and someone was asking about Servo embedding in 2013. So we are we are talking about a decade right? This tells us a lot about how important it was for us to focus on embedding and hence we ended up doing quite a lot of work in improving embedding API and making it a bit easy for others to use servo.

open source summit north america 2024 slide-19

Mid last year we decided to build a mini browser. We already had this window that is built using winit. We decided to use egui to build the location bar and the toolbar back, forward and go buttons that you see up there and once we were pretty much done with it, we had good idea about how we are going to move forward. Right now if you go to Servo website and download Servo, you will be seeing this whole window and you can even browse around, open different website and see how how it looks. And once we release this, it didn't just make it easy for us, it made it easy for others also to test it.

open source summit north america 2024 slide-20

There are lots of people who didn't want the toolbar. So for that we have an option you just need to add the --no-minibrowser flag while running servo and then location bar should disappear.

open source summit north america 2024 slide-21

Around the same time we were also talking to Tauri folks. We collaborated to integrate Servo in Wry project. And of course thanks a lot to NLnet Foundation for sponsoring this work.

Wry is a fully open source web view library. It is still very much an experimental phase. They uses right now WebkitGTK behind the scenes as a rendering engine and they wanted to see how Servo would do. Can they integrate Servo and run it and result is in front of you. That's the short answer, but long long answer is we worked together. We exchanged quite a lot of feedbacks, what they needed from us, in order to embed servo. So we had like a meta issue opened on GitHub that listed the work we need to do.

And one of those things was making build process easier and we did ended up working on providing an easier way to build our biggest C++ dependencies that was mozjs and mozangle. We have shared object for mozangle that you can experiment with. We have a static library for mozjs right now and there's a work going on for shared object for mozjs as well. After some work on our side Tauri folks were able to integrate Servo. They shared this demo with us. If you are a system person, you can checkout how servo has been embedded but If you are a front end engineer, you don't need to care about servo embedding, you also don't need to care about what is going on inside wry, you just need to write some HTML, CSS and JS in order to build the UI and that's all to build the application. So in this example you can imagine some HTML and CSS for the animation you just need to follow the instruction to run you project and that's all wry will take care of your requirements and servo will take care of rendering things.

I went ahead and built a small timer as I just wanted to see how much work it would be for a front-end engineer. Because wry is also written in Rust, servo is also written in Rust, not many people want to dig into the rust code, So, what am I supposed to do as a front end engineer? In order to test this experiment I just had to write HTML, CSS and some JavaScript to build a timer and that was it. I followed the instruction to run the project and that was all. You can check this timer project on my my localy fork of wry

open source summit north america 2024 slide-22

Another embedding example I have is Dioxus. We were talking about servo rendering engine as whole right? But what Dioxus did was unique, they just took a part of Servo and played around with it. They took the Stylo and they used it for styles and selector matching. Stylo is maintained by Mozilla right now, and we have a downstream version. There were some comments from community and other people that they would like to use Stylo and how we can make it easier for them. So we learned from this experience and moved the stylo to a different repository, before it was part of same repository as Servo. So now if someone wants to use stylo, it's a bit easier.

open source summit north america 2024 slide-23

And after Dioxus, the recent one is KDAB QT. They managed to run Servo inside QT and they used the CXX QT library as bridge. And this library is like safe introp between Rust and QT. You can think of it as bidirectional C++ and Rust binding. This was pretty cool.

open source summit north america 2024 slide-24

So other then embedding Android work going on, like I was saying, Servo is running on Windows, Linux and Mac OS. We also wanted to add support for Android. So I think towards the end of the last year we started working on adding Android support. We have Android build support now. We have Servo running on Android emulator and we also have support for x86_64 images. I think we landed this support recently. Serveo runs on Android now.

open source summit north america 2024 slide-25

Now that I'm already talking about 2024, Servo also took a step further in different direction. Servo participated in Outreachy. Outreachy is a three month paid remote internship program. We had many contributors coming in and contributing to Servo project. During the contribution phase, we had lots of people sending patches to improve the code health and the docs as well as the layout of Servo project.

open source summit north america 2024 slide-26

Last year we started work for adding initial android support and we want to continue doing the work. We also want to continue doing the embedding work as we have a few projects experimenting with Servo this year. We want people know about Servo, so we want to continue doing the outreach work. We also want to continue adding CSS support. We want to continue doing the project maintenance work, while you can keep adding new features it is important to maintain and update project as new dependencies gets added.

open source summit north america 2024 slide-27

We recently listed ourselves on Open Collective as well as on GitHub sponsor. You can support us now, either on Open Collective or on GitHub and if in case you want to talk to us directly, you can also reach out to us at info@servo.org.

Support is important from community.

open source summit north america 2024 slide-28

So with that thanks a lot. Thank you for listening. I am around so feel free to ask questions. I'm also at the Igalia booth, so if you want to try the Raspberry Pi or have questions about embedding Servo, or if you have projects that you would like to embed Servo in, feel free to reach out. Thank you.