Loading video...

Video Failed to Load

Go Home

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

PocketJS's profile picture
PocketJS3 months ago

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:

PocketJS's profile picture
PocketJS3 months ago

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

DannyW's profile picture
DannyW3 months ago

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

PocketJS's profile picture
PocketJS3 months ago

Thanks!

StonedModder's profile picture
StonedModder3 months ago

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

PocketJS's profile picture
PocketJS3 months ago

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

Sree's profile picture
Sree3 months ago

this is sick!

EA-18G Growler Enjoyer's profile picture
EA-18G Growler Enjoyer3 months ago

Super cool project

0xbogan's profile picture
0xbogan3 months ago

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

PocketJS's profile picture
PocketJS3 months ago

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.

Garrett Walker's profile picture
Garrett Walker3 months ago

@evanyou That is insane!

harold's profile picture
harold2 months ago

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

Related Videos