Blitz-Quick is an experimental, ultra-minimal, and high-performance cross-platform UI rendering architecture. It completely discards heavy browser kernels (Chromium/WebKit) and the V8 engine, utilizing a Rust + QuickJS stack to deliver a native application base with an extremely low memory footprint.
export-1783741591655.mp4
"JS only handles UI logic, everything else is delegated to Rust."
In traditional Webview / Electron architectures, massive DOM trees and complex Browser APIs consume vast amounts of memory and introduce significant IPC overhead. The core objectives of this project are:
- DOM-less Reactive UI: Uses
SolidJS(via a customsolid-js/universalrenderer) as the frontend reactive framework. Stripped of all real DOM and Web APIs (window,document), the JS side only maintains an ultra-lightweight component tree, utilizing signals to drive high-speed, fine-grained updates. - Lightning-fast FFI Binary Communication: Discards traditional JSON string serialization between JS and Rust. The JS layer packs UI mutation instructions (Opcodes) into compact binary
Uint8Arrayframes and flushes them directly to Rust. - Native Rust Rendering: After receiving rendering instructions, the Rust side safely manages node lifecycles via a Generational Arena (completely preventing dangling pointers and cross-language memory leaks), and takes charge of the actual layout, style parsing, and graphics rendering.
- Extreme Minimalism: The frontend includes a custom-built, ultra-lightweight native router (
@blitz-quick/solid-router), removing all unnecessary web dependencies.
This is a Monorepo workflow powered by Bun + Cargo:
crates/blitz-quick/: Embeddable QuickJS + Blitz runtime library.crates/blitz-quick-desktop/: Reusable desktop window, event-loop, and Vello renderer integration.packages/protocol/: TypeScript definitions for Opcodes and EventCodes for JS-Rust communication (the Source of Truth).packages/core/: Low-level runtime shims (e.g., FFI bindings, patched implementations ofrequestAnimationFrameand timers).packages/solid-renderer/: The core custom SolidJS renderer. It intercepts SolidJS'screateElementand similar methods, translating them into binary rendering instructions for Rust.packages/solid-router/: A handwritten, cross-platform native frontend router in under 50 lines of code, with zero DOM API dependencies.apps/demo/: The actual business logic demonstration. Uses Vite + UnoCSS to compile and bundle thebundle.js/bundle.cssexecuted by QuickJS.
You need the following toolchains installed:
- Rust / Cargo (Latest stable version is fine)
- Bun (For lightning-fast frontend dependency installation and building)
-
Install Frontend Dependencies:
bun install
-
Build Frontend Assets & Generate FFI Code: This step executes codegen to translate the TS protocol into Rust enumerations, and uses Vite to build the UI JS bundle for the demo.
bun run build
-
Start the Hacker News Application:
cargo run -p hackernews
Development Mode (Hot Reloading): Run Vite and the desktop host in separate terminals:
bun run --filter hackernews dev cargo run -p hackernews --features viteThe desktop host loads Vite's transformed ESM modules into QuickJS and forwards Vite HMR updates to
solid-refresh. Accepted component updates keep the QuickJS context and unaffected Solid parents alive. Updates that require Vite'sfull-reloadfallback currently requires restarting the application.
blitz-quick-desktop is a library rather than a standalone launcher. Rust
applications construct a DesktopApp with their JavaScript, stylesheet, and
native extensions; see apps/hackernews/src/main.rs for the complete host.
This project is configured with Biome for consistent frontend formatting and linting.
- Format Code:
bun run format - TypeScript Type Check:
bun run check
This project was deeply inspired by PocketJS. Their pioneering work in Rust-based minimalistic UI rendering and architectural design significantly influenced the direction of Blitz-Quick.
Disclaimer: The vast majority of the code in this repository was generated by AI. The author comes from a Rust background with limited expertise in JavaScript/TypeScript ecosystems.
We highly welcome and do not mind AI-generated Pull Requests! However, please explicitly declare that you used AI in your PR description. This helps maintain transparency and sets the right expectations during the review process.