A cross-platform native UI engine where app logic runs in Go and each platform draws with its own native views.
pocket-nexus/pocketjs
TypeScript UI runtime that renders native pixels on handhelds, desktops and embedded screens, with no DOM or WebView.
- Stars
- 1,837
- Forks
- 104
- Open issues
- 93
- Last commit
- 20 hours ago
What is it?
PocketJS is an application runtime for building interfaces that render as native pixels instead of through a browser engine. Applications are written in TypeScript with Solid, Vue Vapor or Octane components; all three adapters render to one native tree. A QuickJS guest runs the application while a Rust core does flexbox layout and drawing in one thread inside one process, so there is no DOM, CSS engine or WebView in the pipeline.
Styling uses a fixed Tailwind subset compiled into a baked style table at build time, so class attributes are resolved by lookup on the device with no cascade, specificity resolution or reflow. An app contract (pocket.app.json) declares the viewport and required APIs, and one bundle can be checked against targets of different densities. Keyframe timelines and spring curves are baked into the same table and advanced by the Rust core's own clock, so a screen animates without per-frame JavaScript.
The runtime advances an application one frame(buttons) call at a time and treats time as a frame counter, which makes async effects land on frame boundaries and lets tests replay a session byte for byte. It has booted on PSP, PS Vita, iOS, macOS, Symbian, PocketBook e-ink readers, ESP32-P4 hardware and the browser via a WebAssembly core. The repository also contains Pocket3D, a hardware-native 3D stack, and MicroTS, an ahead-of-time compiler from TypeScript views and models to Rust.
Key features
- 01Solid, Vue Vapor and Octane adapters all render to a single native tree on the same QuickJS guest.
- 02A fixed Tailwind subset is baked into a style table at build time, resolved by lookup with no CSS parser or reflow.
- 03Keyframe timelines and spring curves advance on the Rust core clock, so animation needs no per-frame JavaScript.
- 04Applications advance one frame(buttons) call at a time, with async effects queued to frame boundaries for deterministic replay.
- 05Native modules load like kernel drivers: only the cores an app needs, such as net, audio or 3D, enter the build.
- 06A pocket.app.json contract declares viewport and required APIs so one bundle can target screens of different densities.
Use cases
- Building UI applications and game interfaces for handhelds such as the PSP, PS Vita and Nintendo 3DS.
- Building low-overhead interfaces for microcontrollers like the ESP32-P4 or e-ink readers.
- Shipping desktop apps that render natively in one process instead of through a WebView.
- Running deterministic, frame-replayed UI tests in CI without wall-clock timing flakiness.
Quick start
- 1
Create a new app with the PocketJS CLI
pocket create my-app - 2
Check the app against a target device such as the PSP
pocket check --target psp
Things to know
- The MicroTS ahead-of-time compiler is still in development.
- On desktop, the README reports that CPU use rises with document length because the editor re-wraps the whole document on each keystroke.
In collections
Topics
FAQ
- What is pocketjs?
- TypeScript UI runtime that renders native pixels on handhelds, desktops and embedded screens, with no DOM or WebView. PocketJS is an application runtime for building interfaces that render as native pixels instead of through a browser engine. Applications are written in TypeScript with Solid, Vue Vapor or Octane components; all three adapters render to one native tree. A QuickJS guest runs the application while a Rust core does flexbox layout and drawing in one thread inside one process, so there is no DOM, CSS engine or WebView in the pipeline.
- Is pocketjs free to use? What license does it have?
- pocketjs is open source under the MIT license. Check the license terms before using it in commercial products.
- Is pocketjs still maintained?
- Actively maintained. The last commit to pocketjs was on Nov 6, 2026.
- What can I use pocketjs for?
- Building UI applications and game interfaces for handhelds such as the PSP, PS Vita and Nintendo 3DS. Building low-overhead interfaces for microcontrollers like the ESP32-P4 or e-ink readers. Shipping desktop apps that render natively in one process instead of through a WebView. Running deterministic, frame-replayed UI tests in CI without wall-clock timing flakiness.
- How do I install pocketjs?
- Create a new app with the PocketJS CLI: pocket create my-app Check the app against a target device such as the PSP: pocket check --target psp
- Where can I get pocketjs?
- The source code and installation instructions are on GitHub: https://github.com/pocket-nexus/pocketjs
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Rust engine for native cross-platform UI, letting you write apps in Rust or TSX and render with each platform's own widgets.
A free, MIT-licensed C UI library for building graphical interfaces on embedded devices, from small MCUs to Linux-based MPUs.
A Go framework for building desktop apps with either a web frontend in the OS webview or a native UI drawn on the GPU.
A Python GUI toolkit that renders apps with each operating system's native widgets.
A framework for building native iOS, Android and visionOS apps with JavaScript or TypeScript, using native UI and APIs directly.