BinWeb
Technologies Used
Plugin Info
System Topology
Fig 1: BinWeb Compilation & Execution Pipeline
The primary engineering challenge with modern desktop web wrappers like Electron or Tauri is the massive overhead introduced by bundling dedicated runtimes and browser binaries. BinWeb was architected to solve this by acting as a zero-dependency C++ bridge to the host operating system's native WebView environment (Edge WebView2 on Windows, WKWebView on macOS/iOS, WebKitGTK on Linux).
Instead of relying on external asset folders that can be easily tampered with, BinWeb utilizes a custom CMake pre-build step. This pipeline intercepts static web assets (HTML, CSS, JS), compresses them, and converts them into hexadecimal C++ arrays. These arrays are then compiled directly into the binary's code segment.
To serve these embedded assets to the native WebView, BinWeb intercepts network requests using a sandboxed local protocol handler (file://). This is a critical architectural decision: standard data-URIs force a "null" origin, which breaks modern HTML5 APIs. By sandboxing the extraction and utilizing a secure local protocol, BinWeb preserves the origin context, ensuring that APIs like localStorage, IndexedDB, and the Cache API function flawlessly without the overhead of spinning up a local localhost HTTP server.
Core Capabilities
Zero-dependency compilation resulting in native binaries typically under 5MB
Hex-encoded asset embedding directly into the executable code segment
Sandboxed file:// protocol interception to preserve web app origin contexts
Full HTML5 API support including localStorage, IndexedDB, and Cache APIs
Cross-platform build pipelines supporting Windows, macOS, Linux, iOS, and Android
Monolithic HTML bundling for single-file, portable distribution
Architectural Implementation
01Asset Embedding Pipeline
Engineered a custom CMake pre-build script that compresses and converts static web assets into C++ hex arrays. These arrays are compiled directly into the binary, entirely eliminating external file dependencies and protecting source assets.
02API Preservation & Sandboxing
Implemented temporary secure file extraction paired with custom file:// protocol interception. This approach bypasses the limitations of data-URIs, ensuring that origin-dependent web APIs maintain their context securely without a local HTTP server.
Production Validation
- Validated production readiness in ProBill, a fully-featured Windows desktop billing application
- Achieved total executable sizes under 3MB with zero embedded browser overhead
- Established a single-source codebase scaling seamlessly across multiple OS ecosystems