Loading video...
Video Failed to Load
We compiled reactive JavaScript into a cartridge. The same Vue component now runs on a 2KB RAM NES and a Game Boy Advance. No JavaScript engine. No GC. The computed values and UI effects are compiled directly into bare-metal C. This is Pocket Vapor. ⚡️
73,071 views • 3 months ago •via X (Twitter)
12 Comments

The Pocket Vapor experiment is now in the PocketJS repo under vapor/. It’s still early, not a release yet. But the compiler, console targets, and cross-runtime parity tests are already here:

How do you run Vue reactivity on a machine with 2 KB of RAM? The full technical writeup:

Love the work you are doing. It’s awesome seeing all these updates, keep them coming

Thanks!

If yall can add support for switch and Wii U as well eventually you win Pocket js is sick !

They’re definitely in scope. PocketJS aims to cover a very broad hardware spectrum!

this is sick!

Super cool project

If I'm reading the numbers right, it means you can have a form with about twice as many elements before you run the NES out of RAM

Not quite. The ~940 B number is app state on the GBA, not the NES’s total footprint. The NES’s 2 KB must also hold the record pool, computed views, shadow screen grid, and C stack, so this demo is currently capped at 8 todos. There isn’t a generic elements-to-RAM ratio yet; the compiler derives and checks a static memory plan for each component and target.

@evanyou That is insane!

But no canvas support or way to draw to gba screen instead of canvas?

