Boa is an embeddable JavaScript engine written in Rust that implements an ECMAScript lexer, parser, and interpreter with support for more than 90% of the latest ECMAScript specification.
The engine solves the problem of executing JavaScript code within Rust applications without relying on external JavaScript runtimes. It achieves this through a complete implementation of the ECMAScript standard, providing a lexer and parser that build an abstract syntax tree, which is then executed by an interpreter. The project maintains multiple specialized crates for different concerns: the parser handles lexing and parsing, the engine implements ECMAScript builtins and execution, a garbage collector manages memory, and additional crates provide string handling, AST representation, and WebAPI features. The tool can be compiled to WebAssembly for browser-based execution and offers both a programmatic API and a command-line interface with REPL support.
Developers should choose this tool when they need to embed JavaScript execution directly in Rust applications or when they want a JavaScript runtime that compiles to WebAssembly without external dependencies. It suits projects requiring standards-compliant ECMAScript support and those where the overhead of spawning a separate JavaScript runtime is unacceptable. The project is particularly valuable for applications targeting WebAssembly, as it provides a complete JavaScript engine that can run in the browser through its Wasm playground and can be integrated into Rust projects via the boa_engine crate.
The project maintains active development across multiple specialized crates with clear separation of concerns, indicating a mature architectural approach to the problem. Conformance testing against the ECMAScript Test262 test suite is continuously tracked and published, showing commitment to standards compliance. The project provides comprehensive documentation including API references, debugging guides, and contribution guidelines, with specific support for WebAssembly compilation targets and configuration options.