# Neutralino.js — Lightweight Desktop App Framework Without Heavy Runtimes > Build cross-platform desktop applications with HTML, CSS, and JavaScript that ship as tiny binaries without bundling a browser engine. Neutralino uses the operating system's native WebView and exposes system APIs through a lightweight runtime. ## Install Save as a script file and run: # Neutralino.js — Lightweight Desktop App Framework Without Heavy Runtimes ## Quick Use ```bash npm install -g @neutralinojs/neu neu create myapp cd myapp && neu run ``` ## Introduction Neutralino.js is a lightweight desktop application framework that uses the operating system's built-in WebView to render web content instead of bundling Chromium. This approach produces binaries under 5MB (compared to 150MB+ for Electron apps) while still allowing developers to build cross-platform desktop apps with standard web technologies. ## What Neutralino.js Does - Renders UI using the OS native WebView (WebKit on macOS/Linux, WebView2 on Windows) - Provides a JavaScript API for native operations (filesystem, OS info, clipboard, shell, windows) - Ships applications as a single lightweight binary plus web resources - Supports extensions via child processes for running native code alongside the web app - Offers hot-reload during development and a built-in update mechanism for releases ## Architecture Overview Neutralino runs a lightweight C++ server process that hosts web resources and exposes native APIs via a WebSocket connection to the frontend. The UI renders in the platform's native WebView component rather than a bundled browser. Communication between the web frontend and the native backend happens through a bidirectional WebSocket channel, with the frontend calling native functions and receiving events. Extensions can be created as separate processes (in any language) that communicate with the main process via IPC, enabling integration with native libraries. ## Self-Hosting & Configuration - Initialize projects with `neu create` which scaffolds the app structure with HTML/JS/CSS - Configure the app in `neutralino.config.json` (window size, permissions, icon, modes) - Choose between window mode (native window), browser mode, or cloud mode (remote access) - Build for all platforms with `neu build` producing binaries for Windows, macOS, and Linux - Use the built-in updater by hosting a manifest JSON and calling `Neutralino.updater.update()` ## Key Features - Tiny application size (2-5MB) compared to Electron's 150MB+ baseline - Low memory usage since it leverages the OS WebView rather than spawning a full browser process - No dependency on Node.js runtime for the production build - Cross-platform builds from a single machine with `neu build --release` - Extension system allows integrating native code in any language via IPC ## Comparison with Similar Tools - **Electron** — bundles full Chromium for consistent rendering; Neutralino uses OS WebView for drastically smaller binaries - **Tauri** — similar OS WebView approach with Rust backend; Neutralino uses C++ and offers simpler JavaScript-centric development - **NW.js** — bundles Chromium like Electron; Neutralino avoids the bundled browser entirely - **WebView (Go/Rust libraries)** — lower-level bindings; Neutralino provides a complete framework with CLI, config, and API abstractions - **PWA/installed web apps** — limited native API access; Neutralino provides filesystem, shell, and OS-level capabilities ## FAQ **Q: Does the OS WebView create inconsistencies across platforms?** A: Some CSS or JavaScript features may behave differently across WebKit (macOS/Linux) and WebView2 (Windows). For most applications, modern web standards are consistent enough. Testing across platforms is recommended for complex UIs. **Q: Can I use React, Vue, or other frameworks with Neutralino?** A: Yes. Neutralino serves static web resources, so you can use any frontend framework. Build your framework project and point Neutralino's document root to the output directory. **Q: How do I access native code or libraries?** A: Use the extensions system to spawn a child process (Python, Go, Rust, etc.) that communicates with the Neutralino app via IPC. This provides access to any native library without modifying the core runtime. **Q: Is Neutralino suitable for complex desktop applications?** A: Neutralino works well for utility apps, dashboards, and tools. For apps requiring deep OS integration (system tray, multiple windows, complex menus), evaluate whether the API surface meets your needs. ## Sources - https://github.com/neutralinojs/neutralinojs - https://neutralino.js.org/docs --- Source: https://tokrepo.com/en/workflows/asset-a31b5850 Author: Script Depot