When you just need to build a tiny desktop app: TinyJS
As the world’s billionaires anxiously plot datacenters to run trillions of lines of AI-generated slop code, one software engineer has zagged in a completely different direction: building an ecosystem for writing and running small apps that run on desktop computers, like it was 1992 all over again.
Self-described “maker of things” Tarwin Stroh-Spijer has created a JavaScript runtime, called TinyJS, for making very small applications (many occupying ~6MB or less on disk) for macOS, Linux or Windows.
To be clear, TinyJS is not a “no code” framework with hobbled capabilities.
It offers the full programming power of JavaScript, along with the visual rendering and communication capabilities of the underlying OS.
The trick to TinyJS’s frugality is that it uses the WebView window of each OS, utilizing the built-in browser engine to visually render the app, rather than implementing a UI layer from scratch.
It uses WebKit to run apps in this fashion on macOS, WebView2 for Windows, and WebKitGTK for Linux.
TinyJS’s approach is starkly different from using the Electron framework, which bundles a Chromium open source browser core with each desktop app.
But whereas Electron promises an identical look-and-feel of an app across all platforms, TinyJS apps will have slight visual variances when run on the different platforms, owing to minor differences in how each OS’s rendering engine works.
The Electron app pays for this cross-platform uniformity: with Electron, even the most basic application can weigh 150MB.
Rust is not always the answer The core of TinyJS is txiki.js, an ultra-compact JavaScript runtime written by Saúl Ibarra Corretgé that makes Deno and Bun look like behemoths.
The starter package is about 5.6MB and the launcher takes up another megabyte or so.
The rest of the package is all developer code, basically.
Stroh-Spijer also simplified the development process by using the OS’ interprocess communication mechanisms for handling data transfer, eliminating the need to bundle an HTTP server for each app, along with all the security headaches that entails.
All coding in TinyJS is done in JavaScript, CSS and HTML – no compiling necessary.
5News aggregated this summary from the outlet’s public feed. The full article, with all the context, is on www.theregister.com — the content belongs to The Register.