
An ECMAScript engine written in Rust
Showing 2 of 2 projects. Click any project card for scope, mentors, and proposal studio.
Mentors: Student: zhuzhu
Currently, the JavaScript engine Boa relies exclusively on a register-based interpreter, which limits its performance. This project proposes implementing the initial version of a Just-in-Time (JIT) compiler for Boa that operates alongside the existing interpreter. Specifically, the JIT compiler will be based on the copy-and-patch technique described by Xu and Kjolstad (2021) and implemented in python/cpython#113464. Unlike traditional JIT approaches that compile code at runtime, copy-and-patch generates executable code by copying precompiled machine code templates and patching them with runtime values such as stack variable offsets. This approach enables measurable performance improvements while avoiding extensive runtime overhead, which is important to Boa’s role as an embeddable engine. The primary goal of this project is to deliver the first JIT compiler for Boa. While only moderate immediate performance improvements are expected, the project aims to provide a solid foundation for future refinement and work toward higher execution speed.
Mentors: Student: shruti.dev
Boa is an embeddable JavaScript engine written in Rust. JavaScript is garbage collected by specification, meaning the runtime is responsible for managing memory and reclaiming values once they become unreachable. Boa's current collector (boa_gc) works and is well tested, but it was designed for correctness first, and now carries design debt that holds back performance and maintainability. Experimental redesign work is already underway in the separate Oscars repository. This project focuses on evaluating that work, auditing the current design, improving the GC where needed (tracing strategy, allocation model, rooting) and integrating a production ready collector into Boa's runtime, backed by stress tests, benchmarks and documentation covering the design decisions and tradeoffs. Extensions may include incremental or generational collection, GC aware VM optimizations and heap visualization tooling.