porffor rebuilds the JS engine as a compiler: an order of magnitude lighter in memory and binary size.
Join us at PlanetScale's San Francisco HQ for a launch event and meetup, featuring a talk and live demos. RSVP ↗
Efficiency
Porffor is an order of magnitude more memory efficient than other runtimes. On a server with 1GB of memory, Porffor fits over 1 thousand applications under load. 40x Node containers and 25x self-hosted workerd.
How it works
JavaScript engines are made for browsers. They are designed for JS (from a web page) unknown at build-time, even though server-side JS is known at build-time existing JS runtimes cannot benefit due to their browser engines. Porffor truly compiles JS ahead-of-time like C or Rust, zero interpreting.
Porffor: compiled ahead of time build-time │ runtime ┌─────────┐ ┌────────────┐ ┌─────┐ │ ┌───────────────────────────┐ │ JS / TS ├──────►│ Porffor IR ├──────►│ C ├─────── │ ───────►│ native binary · Wasm │ └─────────┘ └────────────┘ └─────┘ │ └─────────────┬─────────────┘ │ │ │ runs directly
JS runtime (Node, Deno, Bun) build-time │ runtime — every machine, every start ┌─────────┐ │ ┌───────┐ ┌─────────────┐ ┌────────┐ ┌────────┐ │ JS ├─────── │ ───────►│ parse ├──────►│ interpreter ├──────►│ JIT ×1 ├──────►│ JIT ×2 │ … └─────────┘ │ └───────┘ └─────────────┘ └────────┘ └────────┘ │ the whole runtime ships with your app (~90MB)
Performance
Porffor already outruns V8's interpreter,
without the years or decades of optimization work behind
established engines: it beats Node's --jitless mode
by about 14% and QuickJS by 86%.
V8 benchmark suite · higher is better
Porffor is not at JIT level yet: with their JITs on, Node and Bun score 13 to 17x higher on this suite. That is the gap the compiler work ahead is aimed at, and sustained hot loops like these are the JITs' best case; startup and memory are covered above.
Distribution
Porffor ships your program as a single file that users just run, as that is how it works. With small apps over 50x smaller than bundling a runtime like Bun and Deno, as Porffor instead truly compiles ahead-of-time.
Portability
Porffor compiles through C, so anything with a C compiler can now run JavaScript: game consoles, embedded devices, exotic architectures. Platforms no JS runtime has ever been ported to.
The same pipeline targets WebAssembly. Existing ways of running JS in Wasm embed an interpreter inside the module; Porffor compiles your code itself to Wasm, so modules come out drastically smaller and faster. That makes JS practical for plugin systems and sandboxed edge compute.
Compatibility
Porffor is still early: most existing JavaScript projects will not work out of the box yet. Compatibility is improving quickly across the language, built-ins, and runtime APIs.
Support is tracked package by package: see the npm package compatibility table →
If Porffor does not compile or run your program, report it on GitHub Issues ↗.
Conformance
Rebuilding the JS engine requires reimplementing the entire language from scratch. Porffor tests against Test262, the official ECMAScript conformance suite. Porffor is alpha and still has a lot of compatibility bugs, but it is improving every commit.