Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Deno 4 min read Announcement mediumAdept

Announcing Stable V8 Bindings for Rust

Rusty V8, Deno's zero-overhead Rust bindings to V8's C++ API, is now stable and skips 1.0 to align with Chrome versioning, starting at 129.0.0. The crate integrates V8's build into Cargo and supports custom runtimes, WebAssembly, the V8 Inspector, the Fast API and cppgc garbage collection. Rust's scope-tied `Local<T>` handles catch invalid handle use at compile time, which C++ embedders must manage by hand. The major version bumps every 4 weeks with each V8 upgrade, so breaking changes follow semver and land only alongside V8 updates.

Related posts

  • Deno's Other Open Source Projects

    Deno easyNovice

    Deno publishes many MIT-licensed supporting libraries extracted from its runtime, most of them Rust crates. Highlights include rusty_v8 (zero-overhead Rust bindings to V8's C++ API), deno_core (ops and an event loop mapping JS Promises to Rust Futures), rust-urlpattern, import_map, eszip (a streamable single-file format for serialized module graphs, used by Deno Deploy), sui (embedding data in ELF/PE/Mach-O executables while keeping them code-signable), dnt (Deno-to-npm transform), wasmbuild, the monch parser combinator library, deno_task_shell, the flaky_test macro, and vnotify (detecting changes across millions of S3 objects via hashed notification keys). Most entries come with short usage examples.

  • Roll your own JavaScript runtime, pt. 3

    Deno mediumAdept

    V8 startup snapshots can speed up launch of a custom deno_core-based JavaScript runtime at a typically negligible cost in binary size. A Cargo build.rs script uses deno_core's extension! macro and create_snapshot with CreateSnapshotOptions to serialize the runtime.js extension into RUNJS_SNAPSHOT.bin in OUT_DIR. main.rs then embeds the snapshot with include_bytes!, passes it as startup_snapshot in RuntimeOptions, and switches the extension to init_ops() so only the Rust ops are registered at runtime.

  • Deno 1.20 Release Notes

    Deno mediumAdept

    Deno 1.20 cuts JavaScript-to-Rust op call overhead by up to ~60% by using Rust proc macros to generate a dedicated V8 binding per op, eliminating op routing and skipping deserialization of unused arguments; a 1 MB base64 roundtrip drops from ~125 ms to ~3.3 ms. The release also adds automatic gzip/brotli compression of non-streamed HTTP responses, an unstable `deno bench` subcommand (1000 warmup plus 1000 measured iterations by default), and a cross-platform `deno task` runner using a POSIX-like shell subset. Other changes include import maps in the config file, in-memory TLS certs, `Deno.upgradeHttp()`, FFI global statics, opt-in `--trace-ops` for test leak tracing (made opt-in because of a performance regression), `AbortSignal.timeout()`, and stricter default permissions for tests and workers, plus TypeScript 4.6 and V8 10.0.

  • Roll your own JavaScript runtime

    Deno mediumAdept

    A minimal JavaScript runtime called runjs can be built in Rust by combining the deno_core crate, which wraps a V8 isolate in a JsRuntime, with a single-threaded tokio runtime as the event loop. The tutorial loads and evaluates ES modules from disk, adds a console API in a bundled runtime.js, and exposes async and sync filesystem functions to JavaScript via #[op2] ops registered through the extension! macro. deno_core handles marshalling between JS Promises and Rust Futures, so each new native API needs only a small amount of glue code.

  • How Bun supports V8 APIs without using V8 (part 1)

    Bun hardMaster

    Bun, which runs on JavaScriptCore, implements a growing subset of V8's C++ embedding API so Node.js native modules like cpu-features load without V8. The post contrasts JSC and V8 value representation, calling conventions, isolates/contexts and handle-based lifetimes. It then shows why an initial approach of reinterpreting JSC's 8-byte JSValue as V8's Local<T> pointer failed. V8's inline header functions such as Object::GetInternalField dereference Local pointers and read map and instance-type fields at fixed offsets, so Bun's in-memory layouts must match what V8's compiled-in inline code expects.

The quest for software engineering knowledge.

Look:
Layout: