Blue compiles your JavaScript to C++, then links it into a standalone native binary. Native GUI windows, filesystem, HTTP servers - no Electron, no Node.js at runtime.
curl -fsSL https://bluejs.dev/install.sh | bash
# Write JavaScript
echo 'window.open("<h1>Hello from Blue</h1>", "My App", 800, 500);' > hello.js
# Compile to a native binary
blue -compile hello.js -o hello
# Run it - a native GTK window opens, no Node.js required
./hello
This page is served by a Blue binary - 2.2 MiB total, HTML and HTTP in one self-contained executable.
Your JavaScript entry file is compiled to C++ via a Babel-lowered AST, then linked into a native binary with no interpreter at runtime. Classes, closures, prototype inheritance, destructuring, template literals, and the full array/string/object method suite all work. Use AOT for native windows, filesystem, business logic, and performance-critical loops.
// src/main.js - compiled to C++
var notes = require("fs").readdirSync("./notes");
var file = Blue.Dialog.showOpenDialog("Open", "*.md", false);
Blue.Window.setTitle("Notes - " + notes.length + " files");
window.open("<h1>My App</h1>", "Notes", 900, 600);
An optional embedded QuickJS engine provides full ES2020+, async/await, and npm
packages via esbuild, all bundled into the same binary. The two contexts communicate
over a lightweight bridge: Blue.callAot() and Blue.callIsland().
Use the island for HTTP servers, dynamic logic, and npm packages.
// src/island.js - runs in embedded QuickJS
const http = require("http");
const server = http.createServer((req, res) => {
// call into AOT context and return the result
var note = Blue.callAot("getNote", req.url.slice(1));
res.writeHead(200, { "content-type": "text/html" });
res.end(note);
});
server.listen(3000);
async/await, ES2020+, full closuresfs, path, os, http.node files)worker_threads, child_processcrypto.subtle, WebSockets - partial support onlyeval / new Function(str) at runtime
The island runs embedded QuickJS, not Node.js. npm compatibility varies - pure JavaScript
packages are most likely to work; anything depending on Node.js internals or native addons will not.
Always test your specific packages before shipping. Run blue --print-c file.js to inspect
generated C++ for AOT debugging.
blue -init myapp
cd myapp
blue -build myapp -o myapp
./myapp
blue -compile hello.js -o hello
./hello
blue -build examples/markdown-notes-demo -o notes
./notes
blue -build examples/http-server -o http_demo
./http_demo
blue -build examples/react-init-hybrid -o react_demo
./react_demo
blue -build examples/full-api-demo -o api_demo
./api_demo
Browse all examples at github.com/bluejs-team/Bluejs.
| Blue | Node.js v18 | |
|---|---|---|
| Startup time | ~1 ms | ~108 ms |
| Peak RSS (hello world) | 3.8 MB | 48.5 MB |
| Binary size (hello world) | 60 KB | requires 46 MB libnode.so |
| 10M-iteration loop | ~63 ms | ~112 ms |
| HTTP server RSS (idle) | 6.5 MB | 50.0 MB |
| HTTP server threads (idle) | 2 | 10 |
| HTTP server virtual memory | 14.3 MB | 610.4 MB |
| npm ecosystem | partial (QuickJS island) | full |
Ubuntu Linux, Node.js v18.19.1. Startup and loop benchmarks use blue -compile (strict AOT).
HTTP server uses hybrid mode with QuickJS island and libuv statically linked. The 610 MB Node.js virtual
memory figure reflects V8 heap reservation and JIT buffers at startup, not physical RAM.
Downloads a prebuilt tarball and symlinks blue into ~/.local/bin.
Checks for all required dependencies and tells you what to install.
curl -fsSL https://bluejs.dev/install.sh | bash
Install from the terminal with apt, not the Ubuntu App Center.
sudo apt install ./blue-linux-amd64.deb
Download the zip, extract it, then run the PowerShell installer.
Installs to %LOCALAPPDATA%\Blue and adds blue to your PATH.
Expand-Archive blue-windows-x86_64.zip
cd blue-windows-x86_64
.\install.ps1
Requires a C++ compiler: winget install MinGW.MinGW or MSVC Build Tools.
For native GUI windows, install the
WebView2 SDK
and set WEBVIEW2_SDK_PATH.
Blue emits C++ and compiles it on your machine, so a C++ compiler is always required. Other dependencies are optional depending on what you build.
# Always required
sudo apt install build-essential pkg-config
# For native GUI windows (window.open, Blue.Window, Blue.Dialog)
sudo apt install libgtk-3-dev libwebkit2gtk-4.1-dev
# For HTTP servers and hybrid island builds
sudo apt install libuv1-dev nodejs
Blue is currently closed source. Documentation, examples, and issue tracking are available at github.com/bluejs-team/Bluejs. Join the community on Discord.
# Open a native window
echo 'window.open("<h1>Hello from Blue</h1>", "Hello", 800, 500);' > hello.js
blue -compile hello.js -o hello && ./hello
# Scaffold a full hybrid project
blue -init myapp
blue -build myapp -o myapp && ./myapp