Crates in Firefox Over FFI
Lightningat RustConf 2026 · on Wednesday, 2026-09-09· at 17:30· Room 511 | Palais des Congrès de Montréal, Palais des Congrès de Montréal·
summary
Implements URLPattern in Firefox by vendoring Dolan crate into libul, generating JS-callable C++ bindings with webl and using cbindgen-style glue so Rust code is called from the DOM. Addresses ownership gaps with opaque pointers and unsafe marshalling across FFI, stores parsed pattern objects in DOM to avoid repeated parsing, and updates the crate to use SpiderMonkey’s ECMAScript regex. Adds JS context creation, rooting to prevent GC and UTF‑8/16 conversions; outcome: working API with decent performance after these cross-language fixes.
AI-written summary · about
related talks
32mThe Story of Stylo: Replacing Firefox's CSS engine with Rust
31mA Rust Crate that also quacks like a modern C++ Library
22mExtending JavaScript with Rust
45mInteraction with real-world JavaScript from compiled Rust
31mOne Thousand Ways to Die in Rust FFI
01h 11mDuck-Tape Chronicles - Rust C++ Interop
30mTrials, traits, and tribulations
01h 40mKeynote: An Introduction to Rust
