Building a JavaScript Engine in Rust: Lessons From Boa

This ad is not shown to multipass and full ticket holders
React Advanced
React Advanced 2026
October 23 - 26, 2026
London, UK & Online
Upcoming event
React Advanced 2026
React Advanced 2026
October 23 - 26, 2026. London, UK & Online
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

Get started

JavaScript engines power the web, but what does it actually take to build one, and even contribute to the ones used by billions?

In this talk, I'll share the journey of creating Boa, a JavaScript engine written in Rust, and what it taught me about how JavaScript really works under the hood. We'll explore how code is parsed and executed, and the surprising complexity hidden inside the ECMAScript specification.

But building an engine wasn't just a technical challenge, it was also about building a community. I'll share lessons from leading an open-source project, growing contributors, and navigating the realities of maintaining a language runtime.

Finally, we'll look at how this work extended beyond Boa, culminating in contributions to V8, the engine that powers Chrome, through the implementation of Temporal in Rust. This is the story of how an open-source project can evolve from experimentation to influencing the broader JavaScript ecosystem.

This talk has been presented at JSNation 2026, check out the latest edition of this JavaScript Conference.

Jason Williams
Jason Williams
24 min
15 Jun, 2026

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Jason Williams, a senior software engineer at Bloomberg and TC39 delegate, discusses contributing to Servo project in Rust. The process of developing Boa JavaScript Engine involved highlighting its speed, memory safety, and performance compared to Gecko. Principles of building a JavaScript engine in Rust are compared to processing plants with stages like tokenization and parsing. Tokenization involves breaking down JavaScript code into tokens following the ECMAScript specification. Boa's community contributions focused on enhancing CPU caching, inline caching, and testing for conformance. The engine successfully implemented Temporal, achieving a high test pass rate and integration into major engines.

1. Introduction to JavaScript Engine in Rust

Short description:

The speaker introduces themselves as Jason Williams, a senior software engineer at Bloomberg and a TC39 delegate. They share their experience with contributing to the Servo project using Rust to replace the Gecko engine in Firefox.

Thank you for having me here. I'm thrilled to be presenting this and being part of the event. I would love to be there in person, but digital is good too. We'll be talking about building a JavaScript engine in Rust, lessons from Boa. We'll see how we get on.

But before we do, my name is Jason Williams. I'm a senior software engineer at Bloomberg. I'm also a TC39 delegate, so that is the JavaScript Standards Committee. If you have any questions from this talk, you can post them, I believe, underneath this video. Or you can also reach out. I'm most active on Blue Sky, so you can catch me there. My domain name, JasonWilliams.co.uk. I'm also in other places, but I'm probably most active on Blue Sky, I would say.

So, yeah, about me. I've been an open source contributor for many years. Ten years ago, I was really interested in learning more about browsers, rendering, paint, layout, that sort of thing. So, I contributed to a project called Servo, which is a parallel browser engine project that was maintained by Mozilla at the time. And it was essentially designed using a new programming language back then called Rust to replace Gecko, which was the engine in Firefox.

The language was very new. So, actually, even when you were writing in that language, it could be changing underneath you. So, some of the syntax that you wrote two weeks ago was no longer valid. And I remember we often had, like, formatters and tools that would just go around and update all the syntax every now and then. I don't think I made a significant contribution to the engine during the time. But one thing that I did, I may have been the first person or one of the first to get it working on Windows. It didn't work on Windows at all back then. So, that was I was a Windows user. So, that was my main objective at the time. I was grabbing information from people that was just in people's heads. Nothing was written down. And I essentially collated all of that together, made a guide for myself.

2. Development of Boa JavaScript Engine

Short description:

The speaker shares their experience of getting Servo to work on Windows and promoting it through a blog on Mozilla Hacks. They highlight Servo's speed, performance, concurrent CSS engine, memory safety, and speed compared to Gecko. The decision to explore building a JavaScript engine led to the creation of Boa, inspired by Mozilla's animal-themed project names and personal encounters.

It was actually for my own personal use to begin with. And I followed that guide and managed to get Servo booting up on Windows and really wanted to share this with the rest of the world. So, I was quite lucky enough to be able to do a blog on the Mozilla Hacks almost ten years ago. 2017. And I was very proud of this because it was not just showing off to the world that Servo is alive and working on Windows, but also allowing people to get more involved in front of you who couldn't before because of the operating system they were on.

Another thing that stood out to me on Servo was the speed. It was quite performance. This is running on Reddit back in 2014. I'm sure it's even faster now. But the CSS engine that was written in Rust from scratch was able to make use of multiple cores. It was very concurrent. I think it was actually one of the first concurrent CSS engines at the time. And it had also good memory safety. So, we were all very confident in it. We knew it would work well. There weren't really any crashes. But it was also very fast. It was more than twice as fast as what Gecko had at the time.

So, basically, I thought, well, can we do this with JavaScript? Why not do it in a JavaScript engine? And the Servo team at the time were quite stretched. So, building a JavaScript engine was not something they were too interested in at the time. They were quite happy to continue using Spider Monkey, which is the engine in Firefox. So, I essentially went off and toyed around with some ideas. And eventually just started working on my own. And that's where Boa came in. The naming, I guess I was trying to follow Mozilla's theme of naming projects after animals. I saw a snake in a zoo in Sydney and I thought I really want to name my next project after that. So, yeah, what I'll show you is how I got started, really. Some JavaScript engine principles. It's not exactly how Boa works today. But it's a bit of an insight, really, into where things got started.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

How Bun Makes Building React Apps Simpler & Faster
React Day Berlin 2022React Day Berlin 2022
9 min
How Bun Makes Building React Apps Simpler & Faster
Top Content
BUN is a modern all-in-one JavaScript runtime environment that achieves new levels of performance. It includes BUN dev, a fast front-end dev server, BUN install, a speedy package manager, and BUN run, a fast package runner. BUN supports JSX, has optimized React server-side rendering, and offers hot module reloading on the server. The priorities for BUN include stability, node compatibility, documentation improvement, missing features in BUN install, AST plugin API, native Windows support, Bundler and Minifier optimization, and easier deployment to production. BUN's AST plugin API allows for bundle-time JavaScript execution and embedding code, potentially inspiring new frameworks.
Never Worry About CORS Again
JSNation US 2025JSNation US 2025
28 min
Never Worry About CORS Again
Talk on Bund: Overview of Bund, its speed optimization, components like runtime, package manager, test runner, and bundler. Efficient features include fast npm manager, pnpm lockfile support, Jest-compatible test runner, and optimized runtime components. Built-in features like modern password hashing, WebSocket server, file glob API, and database clients. API design focuses on common use cases and optimization. Enhanced JavaScript functionality with SIMD, native code, and performance improvements. Challenges in JavaScript productivity, BUN adoption, deployment, and support. React support, community involvement, security, Next.js compatibility, and transition.
Node.js Compatibility in Deno
Node Congress 2022Node Congress 2022
34 min
Node.js Compatibility in Deno
Deno aims to provide Node.js compatibility to make migration smoother and easier. While Deno can run apps and libraries offered for Node.js, not all are supported yet. There are trade-offs to consider, such as incompatible APIs and a less ideal developer experience. Deno is working on improving compatibility and the transition process. Efforts include porting Node.js modules, exploring a superset approach, and transparent package installation from npm.
Bun, Deno, Node.js? Recreating a JavaScript runtime from Scratch - Understand magic behind Node.js
Node Congress 2023Node Congress 2023
29 min
Bun, Deno, Node.js? Recreating a JavaScript runtime from Scratch - Understand magic behind Node.js
Top Content
The Talk explores the magic behind Node.js and delves into its components, including V8, libuv, and the C++ bridge. It discusses the workflow and execution process, the use of NodeMod, and the understanding of console functions. The Talk also covers Node.js functions and scheduling, the introduction of runtimes, and the collaboration between JavaScript runtimes. It concludes with insights on content production, the choice of Node.js, and the inspiration behind it.
Eval all the strings! - Hardened JavaScript
Node Congress 2023Node Congress 2023
8 min
Eval all the strings! - Hardened JavaScript
NPM packages can be potentially dangerous, so it's important to be proactive in managing them. Lava Mode allows you to detect and investigate suspicious packages before deploying your app. Lavamote prevents unauthorized access to sensitive resources by isolating dependencies and using hardened JavaScript. Lava Mode makes it easier to analyze obfuscated files and understand their actions.
Roll you own JavaScript runtime
Node Congress 2023Node Congress 2023
21 min
Roll you own JavaScript runtime
This Talk introduces Deno, a custom JavaScript runtime similar to Node.js, and discusses the benefits of using a custom runtime. It explores the process of building a custom runtime with Deno in Rust, including the integration with Cargo and the ability to mix and match crates and APIs. The Talk also covers the implementation of the setTimeout function in both Run.js and Runtime.js, and provides examples of how to fix errors and implement additional functions. Overall, the Talk highlights the flexibility and possibilities of creating custom runtimes with Deno.

Workshops on related topic

Build Peer-to-Peer Applications with Pear Runtime
JSNation 2024JSNation 2024
152 min
Build Peer-to-Peer Applications with Pear Runtime
Top Content
WorkshopFree
David Mark Clements
David Mark Clements
Learn how to rapidly build peer-to-peer applications with Pear Runtime. No servers required. Understand peer-to-peer paradigms and construct applications from well-defined building blocks. This workshop will cover how to create both Desktop and Terminal applications (with discussion for Mobile) that work entirely peer-to-peer from anywhere in the world. By the end of this workshop you should know how to build a new type of highly scalable application with entirely reduced infrastructural costs (~0) along with suitable architectures and best practices for peer-to-peer applications. From the creator of Pear Runtime and the company that brings us keet.io. Table of content:- Introducing Pear- Initial Q & A- Getting Setup- Creating a Pear Desktop Application- Sharing a Pear Application- Running a Pear Application- Creating a Pear Terminal Application- Releasing a Pear Application- Architectural Discussions- Wrap-up Q & A