website coreThe future of websites is already here!PWA + Serwist + Rust Wasm + Electron + IndexedDB +...
This site is a hybrid application that can live on the web as a lightweight site and on the desktop as heavy software for any device.
Overview, analytics, and architecture comparison
Serwist Autonomy
The application turns into an independent tool. Serwist instantly launches heavy WASM binaries and the UI core even in complete absence of network.
egui Performance
Interface rendering via WebGL ensures 60 FPS. Rust takes over memory management and complex calculations unavailable to regular websites.
Electron Access
Coupled with Electron, browser limits are lifted. You get infinite data storage in IndexedDB and direct access to local files.
Performance Comparison
Economics and Speed: Static vs Server (SSR)
Dedicated Servers
Node.js or Python servers that run continuously and render content remotely.
- •Huge hosting bills as user numbers grow.
- •Latency (Ping) when processing heavy graphics and media.
- •Vulnerability to application-layer DDoS attacks.
Serverless / Edge
Next.js functions (Vercel/Lambda). The code runs in the cloud only at the moment of a click.
- •Unpredictable pricing for intensive computing.
- •Freezes upon first launch (Cold Starts).
- •Cloud limits on execution time and memory.
Client-Side Rust
CDN serves static files instantly, and all logic and visualization are moved to the client's device.
- •Zero CPU costs: the client pays with their own battery charge.
- •Instant UI response: egui works without network latency.
- •Complete autonomy: the player and visualizer do not rely on the cloud.
Supersite vs Desktop
The Rust + Electron stack blurs the boundaries between a web page and professional software, while maintaining the freedom of the web.
Architecture Evolution
Сегодня это гибридный сайт-приложение. Завтра этот движок (Rust + WGPU) станет поддерживаться и расширяться нашим браузером. Скоро премьера!
Electron + NAPI-RS
Advantages:
- •Unlimited access: direct work with the file system (std::fs) and PC hardware.
- •Maximum volume: storing terabytes of data without browser quotas.
- •Native threads: real Rust multithreading without Web Workers limitations.
Disadvantages:
- •Distribution weight: the installer takes from 80 MB due to the built-in Chromium.
- •Manual download: the user needs to download and install an .exe or .dmg file.
- •RAM demands: Electron consumes more memory than a browser tab.
PWA + Wasm + IndexedDB
Advantages:
- •Instant start: access via link without installing heavy files on disk.
- •Cross-platform: the same binary works in the browser and as an application.
- •Secure storage: IndexedDB via rexie provides a reliable cache in the browser sandbox.
- •Automatic deploy: Serwist updates arrive in the background on every open.
Disadvantages:
- •Sandbox limits: access to files only through a file selection dialog.
- •Storage quotas: the browser can clear data in case of critical space shortage.
Security and Local-First Control
In the hybrid stack, data remains under your full control. Rust provides military-grade client-side encryption, and the Electron/PWA architecture allows storing keys and files locally, bypassing vulnerable cloud servers.
Why is the Rust + Electron/PWA combination a new security standard?
Backend-less Architecture
Using IndexedDB and local files in Electron eliminates the need to transfer sensitive data to external servers. No APIs — no points for remote attack.
Native Cryptography
Thanks to Rust, AES-256 or RSA operations are performed instantly. Media streams and databases are encrypted on the fly, providing privacy without dropping FPS in the visualizer.
Secure Execution Environment
Rust's strict typing prevents 70% of security bugs. In a PWA, data is isolated by the browser, and in Electron, you define access boundaries yourself via a secure IPC protocol.
Stack Vulnerabilities and Solutions
The hybrid Rust + Electron/Wasm approach is significantly more reliable than regular JS, but running in the Chromium environment imposes its own specific risks.
- Storage SpecificsIn a PWA, IndexedDB data can be erased by the OS when space is low. In Electron, files on disk are accessible to other processes. Solution: using Rust crates for "on-the-fly" database encryption (At-Rest Encryption).
- IPC Bridge SecurityIn Electron, a frontend vulnerability can grant access to system APIs via IPC. Solution: using Context Isolation, restricting Node.js rights, and strict validation of all messages from Wasm to the main process.
- Binary Code AnalysisWasm binaries and native .node modules can be decompiled. Hidden visualizer or player logic might be studied. Solution: obfuscation of critical nodes and offloading license checks to a remote server.
Battle of Ecosystems: Professional Software vs Web
Comparison of the technology stack with industry standards: from native programs to heavy web solutions without introducing a custom browser engine (yet).
Technological Foundation
Serwist + Wasm
Hybrid core: Rust logic, caching via a modern Service Worker. Allows the site to run like an installed program.
- ✓ Shared code for Web and Desktop versions.
- ✓ Instant launch without installation (in PWA mode).
- ✓ Total control over the data lifecycle.
C++ / Qt (Native)
The classic path of software creation (like VLC or Photoshop). Direct interaction with the OS kernel and graphics card.
- ✓ Zero overhead on a browser engine.
- ✓ Access to low-level audio/video drivers.
- ✗ Complex deployment and updates.
- ✗ Lack of out-of-the-box cross-platform support.
Flutter / Dart
Renders the interface via Skia/Impeller. A popular competitor for cross-platform applications.
- ✓ High UI development speed.
- ✓ Good graphics performance.
- ✗ Complex integration with heavy Rust libraries.
- ✗ Wasm version still falls significantly behind in weight.
Battle of Architectures: Real Cases
Stack (Next.js + egui)
Niche: Examples: Figma, Photopea. Professional tools in the browser running at the speed of local software.
+ Link accessibility + Rust power.
+ Safe memory management.
+ Perfect for audio/video visualizers.
- Dependency on WebGL/WebGPU support in the browser.
Electron + NAPI-RS
Niche: Examples: VS Code, Discord, Obsidian. When a "heavy" desktop with access to user files is needed.
+ Work with unlimited data volumes (HDD/SSD).
+ Deep integration with system menus and tray.
+ Native performance of the Rust core.
- High RAM consumption.
Tauri + Rust
Niche: Examples: Bruno, Zed (partially). Light system utilities where minimal installer size is crucial.
+ The binary file weighs 10-15 times less than Electron.
+ Maximum security due to the Rust backend.
+ Usage of the system WebView (less RAM).
- Different engine behavior on Windows (WebView2) and macOS (WebKit).
Are there any drawbacks to this approach?
What should developers and users expect? The investment of time and money is the only downside.
- Team: Development and maintenance require more time, and likely due to the large variety of technologies, an entire team will be needed. Senior specialists, mid-level developers, assistants, and designers. In principle, few will want to take this on, because it's easier to grab a few orders for a regular site and do template work.
- Perspectives: You need to be immediately focused on infrastructure development due to constant software updates and the grandiosity of the project itself. There is no point in starting such a difficult path with small ambitions, otherwise it will not justify itself sufficiently. This is essentially a programmatic application, and hundreds of specialists work on such projects. One person cannot lift this even with AI.
- Risk: Is the idea itself (and this is the most important thing) worth starting this path? After all, you can make a quality product, but if there is no idea, it will not justify itself. On the other hand, not every idea can be implemented on a simple site or just a program.
High performance and reliability for the site are guaranteed, although this will be the most labor-intensive process. But in the end, you will get a universal website-application for any device that works not only online, but also without the Internet! Everything at the highest level: Smooth graphics, 3D engines, and particles at 60+ FPS (via egui/WebGL). Cryptography, physics, signal and sound processing without interface lags. Data processing: Working with gigabyte JSON/binary files right in the browser. Local database storage, which is critical for privacy and security. Full-fledged work with local files takes the site to the application level. Rust logic runs in Chrome, on Windows, macOS, and Linux. Security: Wasm code is harder to decompile than regular JavaScript. Background work, access to USB, COM ports, and specific hardware are available.