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](/img/blog/quest-3-passthrough.png)
Servo has had several new features land in our nightly builds over the last month:
- as of 2024-06-27, document.fonts.ready (@mukilan, @mrobinson, #32576)
- as of 2024-07-03, the getCompilationInfo() method on GPUShaderModule (@sagudev, #32642)
- as of 2024-07-08, window.customElements.getName (@keithamus, #32715)
- as of 2024-07-09, <caption> in tables (@mrobinson, @Loirooriol, @mukilan, #32657, #32695)
- as of 2024-07-13, document.visibilityState and document.hidden (@wusyong, #32635)
- as of 2024-07-18, the measureText() method on CanvasRenderingContext2D (@chocolate-pie, #32704)
- as of 2024-07-23, URL.parse() (@shanehandley, #32819)
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](/img/blog/july-2024.png)
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](/img/blog/devtools-july-2024.png)
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%) |
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”](/img/blog/dco-check.png)
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.
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
- Servo: A web rendering engine for the future (slides) — Manuel Rego spoke at the Global Software Technology Summit 2024 about the status and long-term vision of the Servo project
- Verso: A new browser based on Servo — Wu Yu Wei wrote about their plans to build a more polished Servo-based browser while improving Servo’s architecture
- Verso: Writing its own compositor part 1 — Wu Yu Wei uses Verso as a sandbox to explore how we might rework Servo’s compositor to support multiple windows
- Halfway point — Eri wrote about repairing Servo’s devtools support, from planning to selecting tabs to finding resources and now the console, as part of their Outreachy internship
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.