8.3 KiB
8.3 KiB
marp, title, author, date, paginate, footer, html
| marp | title | author | date | paginate | footer | html |
|---|---|---|---|---|---|---|
| true @marp-team/marp-cli v4.4.0 (w/ @marp-team/marp-core v4.3.0) | Firefox Web APIs with crates over FFI | Ed Guloien | Sept 2026 | true | <span> <img src="images/qb-logo-mark.png" width="60"/> Sept 2026 </span> | true |
Firefox Web APIs with Crates (over FFI)
Ed Guloien
about://ed-guloien
<style scoped> .container { display: grid; grid-template-columns: 1fr 320px; grid-template-rows: auto 1fr; gap: 24px; height: 100%; margin-top: 60px;} .logos { grid-column: 1; grid-row: 2; display: flex; gap: 20px; align-items: center; } .bio { grid-column: 1; grid-row: 1; } .bio ul { list-style: none; padding: 0; margin: 0; line-height: 1.8; } .headshot { grid-column: 2; grid-row: 1 / 3; align-items: center; justify-content: left; } .headshot img { width: 600px; border-radius: 8px; } </style>- Software Developer @ Quantum Bridge:
- Distributed Symmetric Key Exchange
- Former Mozillian: Platform, Networking
- Interests: Privacy, Security, Systems
- ed.guloien@qubridge.io
Interop 2025
URLPattern Web API
// JS
// build a pattern
const pattern = new URLPattern({ pathname: "/books/:id" });
// check for match
pattern.test("https://example.com/books/123");
// get match info by component
pattern.exec("https://example.com/books/123").pathname.groups
Denoland & Firefox
Web API Call Flow
Urlpattern Crate API
Glue Crate
let pattern = quirks::parse::<SpiderMonkeyRegexp>(input);
let results = quirks::process_match(pattern, input);
// call it a day
Reality Sets In (Memory Concerns)
#[repr(transparent)]
pub struct UrlPatternGlue(pub *mut c_void);
if let Ok(pattern) = quirks::parse::<SpiderMonkeyRegexp>(input, ...) {
unsafe {
*res = UrlPatternGlue(Box::into_raw(Box::new(pattern)) as *mut _);
}
}
glue::process_match(..., res: *mut MatchResults, other: MaybeString)
glue::doing_thing(..., res: &mut ThinVec<>);
Pattern Re-use; Marshaling
99.8%
regex::Regex != EcmaScript Regex
Spidermonkey Challenges (many)
And if you do all that...
...











