This month in Servo: console logging, parallel tables, OpenXR, and more!

2024-07-31 Servo’s unique parallel layout engine just got even better.

Servo displaying WebXR content on a Quest 3 in Quest Link mode
Figure 1: Servo can now render to XR headsets via OpenXR. Image: Daniel Adams (Twitter)

Servo has had several new features land in our nightly builds over the last month:

We’ve also landed an experimental OpenXR backend (@msub2, #32817), allowing Servo to display WebXR content on actual headsets like the Quest 3 in Quest Link mode. You can enable it with --pref dom.webxr.openxr.enabled, though the backend currently only works on Windows.

Servo nightly showing a table with a caption, containing demos of several other new features
Figure 2: a table with a caption, containing demos of several other new features.

Rendering changes

Parallel table layout is now enabled (@mrobinson, #32477), spreading the work for laying out rows and their columns over all available CPU cores. This change is a great example of the strengths of Rayon and the opportunistic parallelism in Servo’s layout engine.

We‘ve also made progress on our new flexbox layout engine (--pref layout.flexbox.enabled), landing support for ‘min-height’ and ‘max-height’ on row containers (@delan, @mrobinson, @mukilan, #32785), as well as baseline alignment of row containers with their siblings (@mrobinson, @mukilan, @delan, #32841, #32810) and for their items by setting ‘align-items’ or ‘align-self’ to ‘baseline’, ‘first baseline’, or ‘last baseline’ (@delan, @mrobinson, @mukilan, @nicoburns, #32787, #32790).

We’ve landed support for generic font families like ‘sans-serif’ and ‘monospace’ (@mrobinson, @mukilan, #32673), as well as commas in <font face> (@mrobinson, #32622) and fixes for font matching on Android and OpenHarmony (@jschwe, #32725, #32731).

For replaced elements like <img> and <canvas>, the ‘min-width’, ‘max-width’, ‘min-height’, and ‘max-height’ properties now respect the aspect ratio of the element (@valadaptive, #32777), and you can now change that aspect ratio with the ‘aspect-ratio’ property (@valadaptive, #32800, #32803).

Firefox devtools connected to Servo, showing several console errors
Figure 3: console logging is now supported when using the Firefox devtools.

Devtools and servoshell changes

When debugging in Servo with the Firefox devtools, you can now see console messages from the page (@eerii, #32727), as shown in Figure 3, and you can even debug the devtools connection itself with our new devtools protocol analyzer (@eerii, #32684).

servoshell now has experimental OpenHarmony support (@jschwe, #32594), in addition to our experimental Android support and nightly releases for Windows, macOS, and Linux. We’ve also landed directory listings for local files (@Bobulous, @mrobinson, #32580), made the location bar behave more consistently on Android (@jschwe, #32586), and servoshell no longer quits when you press Escape (@mrego, #32603).

Version and build config servo binary size
Before #32651 126364k
With #32651 110111k (−12.8%)
With #32651
• Without debug symbols
102878k (−18.5%)
With #32759
• Without layout_2013
107652k (−14.8%)
With #32759
• Without debug symbols
• Without layout_2013
100886k (−20.1%)
Figure 4: servoshell binary size improvements on Linux (amd64).

To reduce servoshell’s binary size, we now build our nightly releases with ThinLTO (@jschwe, #32651), and you can go even further by building Servo without debug symbols (@jschwe, #32651) or without the legacy layout engine (@jschwe, #32759). Note that these builds use the production profile in Cargo, not the release profile.

Changes for Servo developers

The Servo book is now the place to go for Servo’s documentation (@delan, #32743). It includes our architecture and design docs, a link to our API docs, as well as docs on building, running, testing, debugging, and profiling Servo.

Servo now builds without the crown linter by default (@jschwe, #32494), simplifying the build process in some cases. If you’re working on DOM code, you can enable it again with ./mach build --use-crown.

GitHub checks popup showing the “DCO” check failing and a link to “Details”
Figure 5: the DCO check will now fail unless you sign off your commits.

When contributing to Servo, your commits must now be “signed off”, which is essentially a promise that you own (or are allowed to contribute) the code in your patch. If the DCO check fails, click Details for help on signing off your commits (Figure 5).

Donations

Thanks again for your generous support! We are now receiving 2955 USD/month (+32.6% over June) in recurring donations.

Servo is now on thanks.dev, and already three GitHub orgs that depend on Servo are sponsoring us there. If you use Servo libraries like url, html5ever, selectors, or cssparser, signing up for thanks.dev could be a good way for you (or your employer) to give back to the community.

We are still receiving donations from 14 people on LFX, but we will stop accepting donations there soon — please move your recurring donations to GitHub or Open Collective. In the meantime, we’ve transferred 2723 USD of donations from LFX to our Open Collective account.

2955 USD/month
10000

As always, use of these funds will be decided transparently in the Technical Steering Committee. Our updated proposal for a dedicated server for CI runners (@delan, @sagudev, @nicoburns) was accepted, which should reduce build times significantly, and this is just the start!

For more details, head to our Sponsorship page.

Conferences and blogs

Alan Jeffrey (1967–2024)

Alan Jeffrey, an early member of the Servo team and a key part of helping the Servo project find a new life outside of Mozilla, passed away on 4 July.

His research has furthered a wide range of fields, including concurrent and distributed systems, programming languages, formal verification, software semantics, typesetting, protocol security, and circuit design.

Alan’s family have also written about his kindness, curiosity, and persistence on his LinkedIn page.