gitwtfhub

wtf is v8x?

littledivy/v8x — explained in plain English

Analysis updated 2026-05-18

20RustAudience · developerComplexity · 4/5Setup · moderate

TL;DR

A Rust library that lets projects using the V8 JavaScript engine switch to JavaScriptCore or QuickJS-ng without changing their code.

Mindmap

mindmap
  root((v8x))
    What it does
      Drop in engine swap
      Same v8 crate interface
      No code changes needed
    Tech stack
      Rust
      V8
      JavaScriptCore
      QuickJS-ng
    Use cases
      Shrink binary size
      Swap engines in Deno
      Build JS runtimes
    Audience
      Rust developers
      Runtime builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Swap the JavaScript engine under a Rust project like Deno without touching its own code.

REASON 2

Shrink the binary size of a Rust based JavaScript runtime by using a smaller engine or the OS's built in JavaScriptCore.

REASON 3

Compare binary size tradeoffs between V8, JavaScriptCore, and QuickJS-ng for a given project.

What's in the stack?

RustV8JavaScriptCoreQuickJS-ng

How it stacks up

littledivy/v8xakitaonrails/ratatui-bubbleteadeepdiy/pdf2md
Stars202020
LanguageRustRustRust
Setup difficultymoderateeasyeasy
Complexity4/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires editing your Rust project's Cargo.toml dependency on the v8 crate.

Wtf does this do

v8x is a Rust library that lets programs built to use Google's V8 JavaScript engine switch to a different JavaScript engine instead, without changing their own code. Normally, a Rust project that depends on the v8 crate is locked into using V8 specifically. v8x acts as a drop in replacement: you swap one line in your project's dependency list, and the rest of your code keeps working exactly as it did before, now running on whichever engine you picked. The project currently supports three different JavaScript engines: V8 itself, JavaScriptCore, which is the engine behind Apple's WebKit browser technology and can also use the version already built into the operating system, and QuickJS-ng, a smaller and lighter JavaScript engine. It works by taking the actual source code of the real v8 crate and reimplementing its internal interface on top of whichever engine you choose, so other libraries that expect the standard v8 crate, such as Deno's deno_core, continue to compile and run without any changes on their end. One practical reason to make this swap is binary size. The README includes measurements for Deno, the JavaScript runtime, built with different engines: using the default V8 engine produces a build around 78.7 megabytes, using JavaScriptCore comes to about 80.7 megabytes, using the JavaScriptCore that is already part of the operating system shrinks that to about 54.2 megabytes since no engine needs to be bundled at all, and using QuickJS-ng produces a build of about 56.1 megabytes with only around 1 megabyte of engine code included. This is a low level, infrastructure focused project aimed at developers who build JavaScript runtimes or tools in Rust and want more control over which JavaScript engine powers their software, particularly when binary size or platform availability matters.

Yoink these prompts

Prompt 1
Help me swap the v8 crate for v8x in my Rust project's Cargo.toml and pick the JavaScriptCore feature.
Prompt 2
Explain how v8x lets deno_core compile unchanged while using a different JavaScript engine underneath.
Prompt 3
Compare the binary size tradeoffs of V8, JavaScriptCore, and QuickJS-ng for my Rust project based on v8x's numbers.

Frequently asked questions

wtf is v8x?

A Rust library that lets projects using the V8 JavaScript engine switch to JavaScriptCore or QuickJS-ng without changing their code.

What language is v8x written in?

Mainly Rust. The stack also includes Rust, V8, JavaScriptCore.

How hard is v8x to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is v8x for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.