talira

SpiderMonkey

Mozilla's JavaScript and WebAssembly engine

open sourceMPL-2.0self-hostablefree

SpiderMonkey is Mozilla's JavaScript and WebAssembly engine, the one in Firefox and Servo. It's written in C++, Rust and JavaScript, with a baseline interpreter and compiler, the WarpMonkey optimizing JIT, WebAssembly compilers and a garbage collector. It can be embedded in C++ and Rust programs, run as a standalone shell, or compiled to WASI to run JavaScript inside WebAssembly. Its code lives in Firefox's repository, under js/src; the other JavaScript engines are V8 and JavaScriptCore.

Problems it solves

  • embed a JavaScript engine in my C++ application
  • run JavaScript inside a WebAssembly module
  • a JavaScript shell to test engine behaviour outside the browser
  • script my Rust program with JavaScript

Features

  • JavaScript and WebAssembly engine used in Firefox and Servo
  • embeddable in C++ and Rust
  • standalone shell
  • compiles to WASI
  • WarpMonkey JIT, baseline interpreter and compiler

Alternatives

The same job

These do what SpiderMonkey does.

  1. V8 Google's open source high-performance JavaScript and WebAssembly engine
  2. JavaScriptCore WebKit's built-in JavaScript engine

Compare SpiderMonkey with the top 3