JS Engine Selection
Glyx supports two JsRuntime backends, selected via glyx.config's
engine field. They're mutually
exclusive at compile time — picking one drops the other's dependency from
the binary entirely, not a runtime toggle you flip later without
rebuilding. Not to be confused with Renderer
Selection (Vello vs. TinySkia) — that's
the 2D graphics backend; this page is the JS engine.
The numbers
| Metric | V8 | QuickJS |
|---|---|---|
| Lean runner binary (Windows) | ~58-60 MB ¹ | ~19.6 MB ¹ |
| List-reconciliation speed | baseline | ~1.8x slower (virtualized), ~5.4x slower (unvirtualized) ² |
| Startup fast-path | V8 snapshot (~50ms restore + ~200ms eval) ³ | no equivalent — snapshot mode runs but the step is a no-op for startup time |
| Idle RAM | baseline | ~9.5% smaller on a minimal test app ⁴ |
¹ hello-world, full glyx build, 2026-07 — real measured build output, not
estimated.
² bench-app profiling, 2026-07 — virtualization narrows the gap
significantly, so virtualize long lists regardless of which engine you pick.
³ Confirmed via real snapshot-mode build/run.
⁴ Explicitly unconfirmed on a fuller app — treat as a weak signal, not a
number to build a decision on. Every other row in this table came from an
actual measured run.
QuickJS's binding surface mirrors V8's completely, including JS plugins
(backend.<name>.<fn>(), hot-reload during glyx dev included). Two known
QuickJS-specific gaps, both narrow: no window.maxJsHeapMb equivalent yet,
and native file dialogs aren't OS-parented to the app window (may appear
behind it on some window managers).
App persona recommendations
| App persona | Engine | Notes |
|---|---|---|
| Most desktop apps | V8 | Mature path — JIT, snapshot fast-start; every example in the repo defaults to it |
| JS-heavy UI (large/frequent list reconciliation) | V8 | QuickJS's no-JIT cost shows up most here |
| Size-constrained distribution | QuickJS | ~3x smaller binary, real and measured |
| Mobile / embedded target | QuickJS | A JIT-based engine may not be viable at all on some targets |
| Settings / dialog / mostly-static UI | QuickJS | Little JS-engine-bound work either way — take the size win |
Explicit config
// glyx.config.ts
export default defineConfig({
engine: 'quickjs', // default: 'v8'
})Keeping the numbers honest
Re-measure on hello-world (binary size) and bench-app (reconciliation
speed) after any engine-affecting change and update this guide if the
numbers move. The idle-RAM figure specifically needs a real measurement on
a fuller app before it should be quoted with any confidence — it's flagged
above for exactly that reason.