Servo: Parallelizing the Browser
Josh Matthews, Platform Engineer
Servo: Parallelizing the Browser
Why build a new engine?
All modern engines originally designed pre-2000
Difficult to run experiments or change fundamental parts
Security and performance are hard - we can do better from the ground up
What is Servo?
Browser engine written in
Rust
Designed for parallelism
Coarse (per-tab)
Lightweight (intra-page)
Designed for embedding
Research project, but probably a mobile product too
When is Servo?
Aiming for "most browser features" by end of 2014
Product by end of 2015
Architecture
Architecture
Architecture
Servo research problems
Parallel layout
Important for mobile platforms
Prevent arbitrary tree access via type system
Layout kernel only interacts with children, can be parallelized
Pre-traversal to look for necessary sequential layout
Work stealing for best performance (task pool, shared queue)
Servo research problems
Concurrent script/layout
Web developers/frameworks learning to avoid sync layout
Run layout simultaneously with script
Layout sees consistent DOM, script mutates "shadow" DOM (copy-on-write)
Servo research problems
Security
C++ memory model responsible for many security vulnerabilities
Safe Rust model neutralizes them (use after free, iterator invalidation)
Task isolation for added protection
Process isolation for additional protection
NaCL for even more protection?
Servo research problems
Other
Partial layout
Alternative memory representations
Maximizing parallelism - selector matching, rendering, compositing, network cache, etc.
How can I help?
Write Rust code (
learn
Rust,
hack
Servo (
good first bugs
))
Write JS/CSS code (
test suite
is small; reftests and mochitests (close enough))
Build and test Servo,
file bugs
(no binaries yet)
Really helpful contributions
Fix
acid2
/
acid3
/
testharness.js
blockers
Make Servo build and/or run on Windows
Implement missing
DOM APIs
Implement missing
CSS features
Finish hsivonen's Rust HTML parser
Servo: Parallelizing the browser
Josh Matthews, Platform Engineer
joshmatthews.net
twitter.com/lastontheboat
josh@joshmatthews.net