talira

Google's open source high-performance JavaScript and WebAssembly engine

open sourceBSD-3-Clauseself-hostablefree

V8 is Google's open source JavaScript and WebAssembly engine, written in C++. It compiles and executes JavaScript, allocates memory for objects and garbage collects them with a generational, accurate collector, and implements ECMAScript and WebAssembly. It runs on Windows, macOS and Linux on x64, IA-32 and ARM processors, and any C++ application can embed it: it's the engine in Google Chrome and Node.js, among others. The DOM and other browser APIs aren't part of it; the embedder provides them. Its source lives in Chromium's Git, with an official mirror on GitHub, under a BSD 3-Clause licence.

Problems it solves

  • embed a fast JavaScript engine in my C++ application so users can script it
  • run untrusted JavaScript plugins inside a native program
  • a JavaScript engine with a JIT compiler for a new server-side runtime
  • execute WebAssembly modules from a C++ host
  • understand why my JavaScript is slow by looking at how the engine optimizes it

Features

  • implements ECMAScript and WebAssembly
  • JIT compilation of JavaScript
  • generational, accurate garbage collector
  • embeddable in any C++ application
  • Windows, macOS and Linux on x64, IA-32 and ARM
  • the V8 Sandbox

Limitations

  • Doesn't provide the DOM or other browser APIs: the embedder supplies them1

Capabilities

Has official SDKsplan not known

Alternatives

The same job

These do what V8 does.

  1. QuickJS Small, embeddable JavaScript engine with almost complete ES2025 support
  2. SpiderMonkey Mozilla's JavaScript and WebAssembly engine
  3. JavaScriptCore WebKit's built-in JavaScript engine

Compare V8 with the top 3