Library:V8
Appearance
| Developer | |
|---|---|
| License | BSD-3-Clause |
| Website | https://v8.dev |
| On this wiki | Facts · Code · Notes · Topics |
V8 is Google's JavaScript and WebAssembly engine (BSD-3-Clause) inside Chromium, Node.js, Electron and CEF applications; it ships a startup snapshot (snapshot_blob.bin or built into the binary) and can produce code caches whose headers are bound to the exact V8 version and flags.
Identification
- Version:
V8_MAJOR_VERSION.V8_MINOR_VERSION.V8_BUILD_NUMBER[.V8_PATCH_LEVEL][-embedder][ (candidate)](include/v8-version.h, src/utils/version.ccVersion::GetString). The text sits in the 64-byte version field of the startup snapshot and appears inlibv8-*.soSONAMEs. Node.js:process.versions.v8; Electron:process.versionslists chrome and v8 (see Library:Electron). - Files:
snapshot_blob.binandv8_context_snapshot.bin(Chromium/Electron; the latter is the context snapshot built with Blink),icudtl.datnext to them,natives_blob.binin very old builds. Builds with an embedded snapshot keep the blob in a data section of the binary or DLL (v8.dll,libcef.dll,node.exe). - Embedded builtins: since V8 9.x/10.x the machine code of builtins lives in the binary as
embedded.Sblob; the symbolv8_Default_embedded_blob_code_marks it on platforms that export it. - Pointer compression and sandbox flags change object layout and are part of the flag hash of code caches.
Related formats
- Format:V8 startup snapshot: header with number of contexts, checksum and version string.
- Format:V8 code cache: what
v8.Script::CreateCodeCache, Node'svm.ScriptcachedDataand tools like bytenode produce; JavaScript source is not needed to run it but the exact V8 version and flag hash are. - Format:Node.js single executable application may embed a snapshot.
Code & repositories
- https://github.com/v8/v8 @
6f9454b67e19ec749aebb8d9d8036735947d5489· license: BSD-3-Clause (declared by the contributor for the files used; GitHub reports BSD-3-Clause (read from LICENSE; GitHub's API was busy) for the repository)
V8 source (BSD-3-Clause). Useful without running: src/snapshot/snapshot.cc (blob header), src/snapshot/code-serializer.{h,cc} (code cache header), src/utils/version.cc, src/flags/flags.cc (ComputeFlagListHash).
Tested on: source read, not run: source read, not run · checked 2026-10-18
Pitfalls
A code cache or snapshot only loads with the same V8 version and the same relevant flags; to read it you need the same V8 build or a disassembler built for that version (--print-bytecode of a matching d8/node). Bytecode formats change with every V8 major.
See also
Library:QuickJS for a small embeddable alternative.