Boa (JavaScript engine)

Last updated
Boa
Original author(s) Jason Williams
Developer(s) Boa Developers
Initial release10 June 2019;5 years ago (2019-06-10)
Stable release
v0.20 [1] / 5 December 2024;0 days ago (2024-12-05) /  ()
Repository github.com/boa-dev/boa
Written in Rust [2]
Platform x86-64, 32-bit ARM, AArch64
Type JavaScript and WebAssembly engine
License MIT
Website boajs.dev

Boa is an open-source JavaScript engine written in Rust. [2] Boa was introduced at JSConf EU 2019 by Jason Williams. [3] [4]

Contents

Williams created Boa in 2017 after working on Servo and being inspired by the "written from scratch" CSS engine. [5] [4] He was eager to work on a JavaScript engine using Rust to learn more about how JavaScript implementations work, since then the project has had over 100 contributors. [3] [6] Overtime the engine gained more prominent features such as bytecode compilation, [7] better conformance to the specification and ergonomic API design. [1]

Design

Boa is an open-source implementation of a JavaScript execution engine. The project is developed as a Rust library for embedding the JavaScript engine in Rust applications. Additionally, the authors of Boa provide a command-line interface (CLI) for users to interact with Boa as standalone JavaScript interpreter accessible from a command line. [8]

Boa follows the common interpreter design which approximately consists of a lexer, parser, compiler and bytecode interpreter [8]

Standards

Boa implements the ECMA-262 specification (ECMAScript). As of 6 September 2024 Boa has 88% conformance to Test262 [9]

See also

Related Research Articles

<span class="mw-page-title-main">JavaScript</span> High-level programming language

JavaScript, often abbreviated as JS, is a programming language and core technology of the Web, alongside HTML and CSS. 99% of websites use JavaScript on the client side for webpage behavior.

Gecko is a browser engine developed by Mozilla. It is used in the Firefox browser, the Thunderbird email client, and many other projects.

ECMAScript is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is standardized by Ecma International in the document ECMA-262.

<span class="mw-page-title-main">SpiderMonkey</span> JavaScript and WebAssembly engine maintained by the Mozilla Foundation

SpiderMonkey is an open-source JavaScript and WebAssembly engine by the Mozilla Foundation. The engine powers the Firefox web browser and has used multiple generations of JavaScript just-in-time (JIT) compilers, including TraceMonkey, JägerMonkey, IonMonkey, and the current WarpMonkey.

JScript is Microsoft's legacy dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer web browser and HTML Applications, and as a standalone Windows scripting language.

Rhino is a JavaScript engine written fully in Java and managed by the Mozilla Foundation as open source software. It is separate from the SpiderMonkey engine, which is also developed by Mozilla, but written in C++ and used in Mozilla Firefox.

A JavaScript engine is a software component that executes JavaScript code. The first JavaScript engines were mere interpreters, but all relevant modern engines use just-in-time compilation for improved performance.

Tamarin is a discontinued free software virtual machine with just-in-time compilation (JIT) support intended to implement the 4th edition of the ECMAScript (ES4) language standard. Tamarin source code originates from ActionScript Virtual Machine 2 (AVM2) developed by Adobe Systems, as introduced within Adobe Flash Player 9, which implements ActionScript 3 scripting language. ActionScript Virtual Machine 2 was donated as open-source to Mozilla Foundation on November 7, 2006, to develop Tamarin as a high-performance virtual machine, with the support from broad Mozilla community, to be used by Mozilla and Adobe Systems in the next generation of their JavaScript and ActionScript engines with the ultimate aim to unify the scripting languages across web browsers and Adobe Flash platform and ease the development of better performing rich web applications.

V8 is a JavaScript and WebAssembly engine developed by Google for its Chrome browser. V8 is free and open-source software that is part of the Chromium project and also used separately in non-browser contexts, notably the Node.js runtime system.

<span class="mw-page-title-main">Node.js</span> JavaScript runtime environment

Node.js is a cross-platform, open-source JavaScript runtime environment that can run on Windows, Linux, Unix, macOS, and more. Node.js runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser.

<span class="mw-page-title-main">Sputnik (JavaScript conformance test)</span> Conformity test for JavaScript implementations

Sputnik was a JavaScript conformance test suite. The purpose of the test suite was to determine how well a JavaScript implementation adheres to the ECMA-262 specification, 5th edition, looking only at those features that were also present in the 3rd edition. It contained over 5000 tests that touched all aspects of the JavaScript language.

CommonJS is a project to standardize the module ecosystem for JavaScript outside of web browsers.

Mozilla is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, publishes and supports Mozilla products, thereby promoting exclusively free software and open standards, with only minor exceptions. The community is supported institutionally by the non-profit Mozilla Foundation and its tax-paying subsidiary, the Mozilla Corporation.

<span class="mw-page-title-main">Servo (software)</span> Experimental browser engine

Servo is an experimental browser engine designed to take advantage of the memory safety properties and concurrency features of the Rust programming language. It seeks to create a highly parallel environment, in which rendering, layout, HTML parsing, image decoding, and other engine components are handled by fine-grained, isolated tasks. It also makes use of GPU acceleration to render web pages quickly and smoothly.

asm.js is a subset of JavaScript designed to allow computer software written in languages such as C to be run as web applications while maintaining performance characteristics considerably better than standard JavaScript, which is the typical language used for such applications.

<span class="mw-page-title-main">WebAssembly</span> Cross-platform assembly language and bytecode designed for execution in web browsers

WebAssembly (Wasm) defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating communication between such programs and their host environment.

<span class="mw-page-title-main">Deno (software)</span> Secure JavaScript and TypeScript runtime

Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.

<span class="mw-page-title-main">AssemblyScript</span> Programming language, variant of TypeScript that compiles to WebAssembly

AssemblyScript is a TypeScript-based programming language that is optimized for, and statically compiled to, WebAssembly. Resembling ECMAScript and JavaScript, but with static types, the language is developed by the AssemblyScript Project with contributions from the AssemblyScript community.

Ark Compiler, also known as ArkCompiler, is a unified compilation and runtime platform that supports joint compilation and running across programming languages and chip platforms, also operating systems of open-source OpenHarmony, Oniro OS, alongside proprietary HarmonyOS with single core system HarmonyOS NEXT included on native APP in Event-driven programming in a unified development environment and formerly built for Android-based EMUI for Huawei smartphones and tablets with HMS-enabled apk apps on AppGallery that improves app performance. It supports a variety of dynamic and static programming languages such as JS, TS, and ArkTS. It is the compilation and runtime base that enables OpenHarmony, Oniro OS alongside HarmonyOS NEXT to run on multiple device forms such as smart devices, mobile phones, PCs, tablets, TVs, automobiles, and wearables. ArkCompiler consists of two parts, compiler toolchain and runtime.

References

  1. 1 2 "Boa release v0.19". boajs.dev. 5 December 2024.
  2. 1 2 "About Boa | Boa JS". boajs.dev. Boa Developers. Retrieved 15 October 2024.
  3. 1 2 Williams, Jason (20 June 2019). "Let's build a JavaScript Engine in Rust by Jason Williams - JSConf EU 2019". YouTube. JS Conf EU. Retrieved 15 October 2024.
  4. 1 2 Jason Williams. "Let's build a JavaScript Engine". 2019.jsconf.eu. JS Conf EU. Archived from the original on 25 February 2024. Retrieved 25 February 2024.
  5. "Hacking & Contributing to Servo On Windows – Mozilla Hacks - the Web developer blog". Mozilla Hacks – the Web developer blog.
  6. "Contributors to boa-dev/boa". GitHub.
  7. "Boa release v0.14". boajs.dev. 15 March 2022.
  8. 1 2 Munsters, Aäron. "BoaSpect" (PDF). Vrije Universiteit Brussel. Retrieved 15 October 2024.
  9. "test262.fyi". test262.fyi. 6 September 2024. Archived from the original on 6 September 2024. Retrieved 6 September 2024.