Technology Stack
2. Technology Stack
Tauri 2 (Rust + WebView)
Tauri is the foundational application framework. Unlike Electron, which bundles a full Chromium and Node.js runtime, Tauri utilizes the OS's native webview (WKWebView on macOS, WebView2 on Windows, WebKitGTK on Linux).
- Rust Backend: Responsible for OS-level integrations: global hotkeys (
tauri_plugin_global_shortcut), filesystem manipulation, system tray, window vibrancy, clipboard, and the custom protocol implementation. - WebView: Hosts the entire SvelteKit frontend application.
SvelteKit
Used for building the primary user interface.
- Routing & Rendering: The application renders essentially as a Single Page Application (SPA). The main interface resides at
src/routes/+page.svelte. - SSR disabled: Server-Side Rendering (SSR) is completely disabled (adapter-static) because this application runs in a desktop webview, meaning there is no Node.js backend to perform SSR.
- Vite: Powers the build pipeline, heavily utilized for its
import.meta.globfeature which enables eager discovery of built-in extensions at build time.
asyar-sdk
A universal bridge SDK mapped into an npm package (asyar-sdk). It exports ExtensionContext, ExtensionBridge, MessageBroker, and proxies for standard host services (LogService, NotificationService, ClipboardHistoryService, FeedbackService, etc.). Its role is to emulate local service access inside an iframe by serializing method calls over postMessage IPC back to the privileged host context.
The asyar-extension:// Custom Protocol
A custom requested defined in src-tauri/src/lib.rs. It intercepts network requests generated by iframed extensions and reads the actual assets from the local filesystem (either from the app's resource directory or the app_data installation directory), bypassing stringent local file schema (file://) CORS policies.