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. [1] JavaScript engines are typically developed by web browser vendors, and every major browser has one. In a browser, the JavaScript engine runs in concert with the rendering engine via the Document Object Model and Web IDL bindings. [2] However, the use of JavaScript engines is not limited to browsers; for example, the V8 engine is a core component of the Node.js runtime system. [3] Since ECMAScript is the standardized specification of JavaScript, ECMAScript engine is another name for these implementations. With the advent of WebAssembly, some engines can also execute this code in the same sandbox as regular JavaScript code. [4] [3]
The first JavaScript engine was created by Brendan Eich in 1995 for the Netscape Navigator web browser. [5] It was a rudimentary interpreter for the nascent language Eich invented. [6] (This evolved into the SpiderMonkey engine, still used by the Firefox browser. [5] ) Google debuted its Chrome browser in 2008, with the V8 JavaScript engine that was faster than its competition. [7] [8] The key innovation was just-in-time compilation (JIT), which Mozilla had also been working on for SpiderMonkey. [9] Because of V8's performance, the other browser vendors needed to overhaul their engines for JIT. [10] Apple developed the Nitro engine for its Safari browser, which had 30% better performance than its predecessor. [11] Mozilla then leveraged portions of Nitro to improve SpiderMonkey. [12] Since 2017, these engines have added support for WebAssembly. [4]
Engine | Description |
---|---|
V8 | A JavaScript engine used in Google Chrome and other Chromium-based browsers (such as Microsoft Edge). Also used in Node.js, Deno, and V8.NET. |
SpiderMonkey | A JavaScript engine in Mozilla Gecko applications, including Firefox. The engine currently includes the IonMonkey compiler and OdinMonkey optimization module, has previously included the TraceMonkey compiler (first JavaScript JIT) and JägerMonkey. |
JavaScriptCore | A JavaScript interpreter and JIT originally derived from KJS. It is used in the WebKit project and applications such as Safari. Also known as Nitro, SquirrelFish, and SquirrelFish Extreme. [13] |
KJS | The engine used in Konqueror, and one component of KHTML, a predecessor to JavaScriptCore. |
JScript | The engine that is used in Internet Explorer for versions up to IE9, and one component of the MSHTML (Trident) browser engine. |
Chakra (JScript9) | A JScript engine used in Internet Explorer. It was first previewed at MIX 10 as part of the Internet Explorer 9 Platform Preview. [14] |
Chakra | A JavaScript engine used in Microsoft Edge [Legacy]. [15] |
Linear B | The ECMAScript engine of the Opera web browser versions 7.0 to 9.50, exclusive. |
Futhark | The ECMAScript engine of the Opera web browser versions 9.50 to 10.10. |
Carakan | A JavaScript engine developed by Opera Software ASA, included in the 10.50 release of the Opera web browser, until switching to V8 with Opera 15 (released in 2013). [16] [17] [18] |
Graal.js | An ECMAScript compliant JavaScript engine for GraalVM which supports language interoperability that can also execute Node.js applications. |
Rhino | One of several JavaScript engines from Mozilla, using the Java platform. |
Nashorn | A JavaScript engine used in Oracle Java Development Kit (JDK) from Java versions 8-14. [19] Now available as a standalone library which can be used with Java 11 and higher. [20] |
JScript .NET | A .NET Framework JScript engine used in ASP.NET based on Common Language Runtime and COM Interop. Support was dropped with .NET Core and CoreCLR so its future looks questionable for ASP.NET Core. |
Tamarin | An ActionScript and ECMAScript engine used in Adobe Flash. |
GNU Guile | features an ECMAScript interpreter as of version 1.9 |
iv | ECMAScript Lexer / Parser / Interpreter / VM / method JIT written in C++. [21] |
CL-JavaScript | Can compile JavaScript to machine language on Common Lisp implementations that compile to machine language. [22] |
BESEN | A complete JIT-compiling implementation of ECMAScript Fifth Edition written in Object Pascal. [23] |
Hermes | developed by Facebook for React Native mobile apps [24] Can also be used independent from React Native. |
Continuum | A self-interpreter that supports older drafts of the ECMAScript 2015 specification. [25] Uniquely, the engine is implemented in ECMAScript 3, which made it possible to run ES2015 in browsers as old as IE6. [26] |
InScript | An obsolete proprietary library used for iCab 2 and 3. |
Jint | Javascript interpreter with integrated engine for .NET |
Narcissus | JavaScript implemented in JavaScript (a meta-circular evaluator), intended to run in another JavaScript engine, of theoretical and educational nature only. |
JS-Interpreter | A lightweight JavaScript interpreter implemented in JavaScript with step-by-step execution. |
QtScript | Originally developed by Trolltech, now owned by The Qt Company. It provides QObject integration with JavaScriptCore. |
V4 (QJSEngine) | Qt's newer ECMAScript engine, powering QML and QtQuick. ES6-compliant and under active development at The Qt Company. V4 is JIT compiled. [27] |
YAJI | An ECMAScript engine based on the FESI implementation by Jean-Marc Lugrin in 1999, using the Java platform, currently being developed to support the latest standards (ECMAScript spec. 262, v5.1). [28] [29] [30] |
Microvium | JavaScript engine for microcontrollers, supporting a restricted subset of the ECMAScript specification, using less than 16 kB of flash memory and 64 B of RAM while idle. [31] |
Duktape | A small footprint, easily embeddable Ecmascript E5/E5.1 engine. [32] |
XS JavaScript Engine | An ECMAScript 2020-compliant engine for microcontrollers with limited resources. [33] [34] XS is maintained by Moddable as part of the Moddable SDK and was formerly part of the Kinoma Platform. [35] |
Jsish | An ES5.1 subset interpreter with builtin SQLite, JSON, WebSocket, and ZVFS support. [36] |
Espruino | A very small footprint interpreter specifically for microcontrollers. Can run in less than 8 kB of RAM by executing from source (rather than bytecode). |
MuJS | A lightweight ECMAScript interpreter library, designed for embedding in other software to extend them with scripting capabilities. Originally developed for MuPDF. [37] |
mJS | Restricted JavaScript engine. Used for Internet of Things (IoT). |
Tiny-JS | A minimal JavaScript interpreter written in C++. |
JerryScript | A lightweight JavaScript engine by Samsung for microcontrollers with less than 64 KB RAM. |
njs | A lightweight JavaScript interpreter optimized for web server scripting and fastest VM context creation; used in nginx. [38] |
quickjs | A lightweight ECMAScript 6 interpreter by Fabrice Bellard and Charlie Gordon; it features a compiler to produce binary executable from .js. |
engine262 | A JavaScript engine written in JavaScript for development and exploration. It is primarily used to validate the ECMAScript specification. |
Boa | A JavaScript engine written in Rust. [39] [40] |
ScriptEase | an old proprietary engine last updated in 2003. Only notable for its use in the James Webb Space Telescope. [41] |
LibJS | JavaScript engine of the SerenityOS and Ladybird projects. [42] Initially it was an AST interpreter, but has been upgraded to a bytecode-based one. [43] At some point, the lead developer Andreas Kling added just-in-time compilation (for x86-64 architecture), but he later changed his mind and removed the mechanism, [44] citing development/debugging issues while also saying that he is interested to see how far utility and usability of the engine can go without it. |
Kiesel | A "small, well-rounded" JavaScript engine by Linus Groh. [45] [46] |