Живоглас

Created by Zhivoglas

System.Level: Extreme

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.

This is the level where you feel power and freedom...

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 Specifics
    In 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 Security
    In 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 Analysis
    Wasm 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.

Like extremes? Using Electron provides super capabilities and the highest performance for a website! While in a regular browser Wasm lives in a "sandbox", in Electron it gets full access to system resources through the Node.js process. How does it work? Wasm still can't write to disk directly, but you can call a function from Node.js that has access to the file system. You can save files of any size (terabytes), create folders, and work with config files right in the system. In the browser, a tab is limited (usually 2–4 GB). In Electron (especially in the main process), you can use as much RAM as is available on the user's PC. This is critical for processing heavy data in Wasm. Through Electron, Rust code (via the Node.js bridge) can work with USB devices and COM ports, access Bluetooth, manage system windows, take screenshots, or run in the tray! In the regular web, SharedArrayBuffer (needed for multithreading in Wasm) is often disabled due to security concerns (Spectre-type attacks). In Electron, you just enable one flag in settings, and multithreaded Rust operates at full capacity. How to combine Rust and Electron? There are two main paths: Wasm + IPC and Node-API (NAPI-RS). This is a full-fledged native code. It runs many times faster. You have direct access to std::fs, std::net, and all Rust crates without browser restrictions. Here, Electron acts as a "super-shell". File Access: While the PWA version is limited to IndexedDB, the Electron version can use std::fs (via the bridge) to work with a local media library. Performance: You can allocate more memory and CPU priority to the application. Performance 🔥 Extreme!