Grepedia
TI

tinyjs

tinyjs enables building cross-platform desktop applications for macOS, Windows, and Linux using JavaScript and native webviews, keeping shipped size to ~6 MB.

Score1
About

tinyjs is a lightweight framework designed for building desktop applications on macOS, Windows, and Linux using JavaScript. By leveraging a high-performance JavaScript backend powered by txiki.js, it provides full system access, including file system, network, processes, FFI, and SQLite, while maintaining a tiny footprint of approximately 6 MB. Unlike Electron, which bundles a heavy Chromium browser and Node.js with every application, tinyjs utilizes the native webview already present on the host operating system—WebKit on macOS, WebView2 on Windows, and WebKitGTK on Linux—drastically reducing the shipped application size.

Functionality revolves around a secure, zero-port RPC bridge between the frontend and a native backend process, communicating over a private Unix socket or named pipe. This architecture ensures performance and security without the complexity of managing local servers or web ports. Developers can use plain HTML, CSS, and JavaScript without a build step, or integrate tools like Vite and TypeScript with ease. The framework is designed to feel native, offering real menu bars, native system dialogs, notifications, and tray icons while remaining strictly production-ready for desktop distribution.

Some of the key features are:

  • Tiny Footprint: Delivers full-featured desktop apps in approximately 6 MB by utilizing native system webviews.
  • No Electron: Avoids bundling bulky Chromium and Node.js, resulting in faster launch times and significantly smaller binaries.
  • JavaScript Backend: Powers apps with the txiki.js runtime, providing native access to system resources via JavaScript.
  • Zero Ports: Communicates via secure, private sockets in a temp directory, preventing port collisions and scan vulnerabilities.
  • Native OS Integration: Features native menu bars, system dialogs, tray icons, notifications, and clipboard access.
  • Hot Reload: Supports rapid development with automatic frontend updates and backend process restarts.
  • Standardized Distribution: Includes built-in support for codesigning, notarization, and auto-updates to facilitate professional distribution.

Operation is straightforward: the framework provides a CLI for scaffolding, running in development mode, and building distributable packages. When an application launches, it initializes the backend process and the native webview window, establishing the communication link. Development mode offers an immediate feedback loop with hot reloading, while the build process generates signed bundles ready for user distribution on macOS, Windows, and Linux.

Some common use cases include:

  • Native-like Utilities: Creating system-level tools such as tray-based clocks, menu-bar monitors, or file management utilities that require deep system integration.
  • Wrapped Web Applications: Wrapping existing web services or hosted sites into a standalone desktop application with native capabilities and capability-gated API access.
  • Cross-platform Productivity Apps: Building Markdown editors, music players, or productivity dashboards that require custom native windows, hotkeys, and persistent storage.
  • Scripting with GUI: Providing a graphical user interface for complex scripts or automation tasks that leverage system-level FFI or SQLite databases.