Electrobun and WGPU: Tiny, cross-platform games and ML with Bun
9 hours ago
- #Electrobun
- #GPU-rendering
- #WGPU
- Electrobun now supports first-class WGPU, enabling direct GPU rendering or use of Three.js/Babylon adapters in Bun without webviews.
- New <electrobun-wgpu> HTML element allows integration of GPU surfaces into webview UIs, similar to <electrobun-webview> OOPIFs.
- Electrobun's state-of-the-art zstd self-extractor and differential updates (as small as 4KB) reduce distribution costs significantly.
- Electrobun v1 launched recently, gaining traction after demo videos went viral, with many migrating from Electron or Tauri quickly.
- Electrobun offers flexibility with a bundleCEF flag for Chromium use and now supports WGPU for non-webview rendering, unlocking GPU workloads like AI inference.
- Pre-built dynamic libraries of Dawn (Chrome's WGPU) are provided, with easy integration via electrobun.config.ts and support for various programming languages.
- Four new WGPU templates are available for instant project starts, including raw WGPU shader apps, Three.js/Babylon.js demos, and a digit classifier.
- Video demos showcase capabilities like shaders in GpuWindow, interactive animations, and DOOM running via WGPU.
- Several open-source projects are already using Electrobun, including a DOOM port, CDP automation CLI, and voice cloning tools.
- Future plans include Steam-sdk integration for Bun TypeScript and a tinygrad-like Engine for easier heavy inference workloads.