← Back to the feed

When you just need to build a tiny desktop app: TinyJS

The Register ·

Tarwin Stroh-Spijer has created TinyJS, a new JavaScript runtime that enables developers to build tiny desktop applications, often occupying just 6MB or less, by leveraging each operating system's built-in webview instead of bundling an entire browser engine. This approach stands in sharp contrast to popular frameworks like Electron, which bundles Chromium with each app, resulting in applications that routinely exceed 150MB even for basic functionality. TinyJS matters because it demonstrates that desktop development doesn't require bloated frameworks and offers a path back to lean, efficient computing.

The core of TinyJS is built on txiki.js, an ultra-compact JavaScript runtime, and uses WebKit on macOS, WebView2 on Windows, and WebKitGTK on Linux. Developers write code in JavaScript, CSS and HTML without compilation, and can use existing frameworks like React, Vue, and Svelte, or no dependencies at all. Stroh-Spijer has created an app store showcasing 25 sample applications, including a world clock (3.8MB), clipboard history tool (3.7MB), markdown editor (4.9MB), and a Winamp music player clone (7.4MB), all available for download directly from the desktop platform.

  • TinyJS produces full-featured desktop applications in 6MB instead of Electron's 150MB.
  • JavaScript apps don't need Node.js or bundled browsers, just native OS webviews.
  • 25 sample apps ready to download, from world clocks to Winamp music player clones.

New here? Start with this

TinyJS is a tool for creating small desktop applications using JavaScript, CSS and HTML. Unlike frameworks such as Electron that bundle an entire web browser with each app, TinyJS uses the webview technology built into your operating system, allowing applications to be just 6MB or smaller rather than hundreds of megabytes.

The tool was created by Tarwin Stroh-Spijer and is built on txiki.js, a lightweight JavaScript engine. It works by using the built-in web technology from your operating system—WebKit on macOS, WebView2 on Windows and WebKitGTK on Linux—and developers can write code without compilation.

Developers can build applications using popular web frameworks like React, Vue or Svelte, or create from scratch. A collection of sample applications demonstrates the approach, with working examples including a world clock (3.8MB), a markdown editor (4.9MB) and a Winamp music player clone (7.4MB).

Software

Read the full article at the source →