Caging the SpiderMonkey - Ensuring safe JS bindings in Servo
summary
Shows how Servo actually wires SpiderMonkey C++ semantics into Rust: a custom vtable trick lets C++ virtual dispatch call Rust methods, a write-barrier wrapper and pinned/heap allocation rules prevent dangling GC roots, and bindgen plus a compiler-plugin lint enforces must-root annotations at compile time. Demonstrates implemented rooter types, post-barrier logic for generational GC, and a working integration used in Servo development rather than just abstract design.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 2:14Overview
- 4:30Tracing Garbage Collector
- 6:47Auto GC Ruler
- 15:47Write Barriers
- 17:55tracking pointers








