d8 2026-11-05
d8 is V8's developer shell for running JavaScript programs and investigating engine behavior. It supplies a small host environment around the engine, with facilities for output, loading files and passing arguments.[ref]
Using d8 in the V8 documentation. Opening description; Print to the command line; Pass flags into JavaScript
For example, a file named
sum.js can contain console.log([1, 2, 3].reduce((a, b) => a + b, 0));. Running d8 sum.js prints 6. The array reduction and addition follow ECMAScript semantics, while console.log is an output facility supplied by the environment.The distinction also appears in arguments. The documentation places arguments after
-- and exposes them through a top-level arguments array. A script that prints arguments[0] can therefore inspect a supplied value. This is a shell convention, not a rule that every JavaScript host passes arguments through that same global object.[ref]Using d8 in the V8 documentation. Pass flags into JavaScript, argument separator and arguments object
d8 also documents
read for reading file content and load for executing another script in the current context. Those host operations are different from merely evaluating an arithmetic expression, even though both are invoked with JavaScript syntax.[ref]Using d8 in the V8 documentation. Read input; Load external scripts
A developer shell is useful for separating an engine computation from a larger application. A web browser additionally supplies document and interaction machinery; the presence of V8 alone does not imply a Document Object Model. When using shell observations as performance evidence, record the engine version, flags, workload and measurement method rather than treating one printed result as a benchmark.
V8 2026-11-05
V8 is an open-source engine implementing JavaScript through ECMAScript and also executing WebAssembly. It can be embedded in applications, so the engine and the application supplying its environment are distinct components.[ref]
For a simple language-level example,
[1, 2, 3].map(x => x * x) evaluates to an array containing 1, 4, 9. The specified array and multiplication behavior belongs to ECMAScript; V8 supplies an implementation of that behavior. The same expression does not require a document or a web browser.The project's d8 developer shell supplies a small environment for running programs. A file containing
console.log(6 * 7); prints 42 when run in that shell. The multiplication is language behavior, whereas the output facility is supplied by the environment.[ref]Using d8 in the V8 documentation. Print to the command line, JavaScript files and console.log
V8 includes Ignition, a register-based interpreter. Interpreter machinery, bytecode and compilation strategies concern how an engine executes a program, rather than changing the program's specified mathematical result.[ref]
Ignition in the V8 documentation. Opening description, register-based interpreter
An embedding application can supply additional objects and functions. A Document Object Model operation therefore depends on a suitable host, not merely on the presence of V8. Likewise, a performance comparison must name the engine version, workload and measurement conditions rather than treating one fast numerical expression as a measurement of an entire application.