How SideX Replaces VS Code’s Electron Core with Tauri + Rust to Shrink Install Size to 16 MB
SideX rebuilds the full VS Code architecture by swapping Electron/Chromium for Tauri’s system WebView and rewriting the Node.js backend in Rust, cutting the installer from 797 MB to 16 MB (a 96% reduction), while delivering comparable editor, terminal, Git, and search features and demonstrating that Rust + Tauri can power complex desktop applications.
Background
VS Code’s official installer is about 797 MB and the runtime consumes over 1 GB of RAM on launch, leading to high CPU usage and fan noise.
SideX Overview
SideX re‑implements the VS Code architecture with Tauri + Rust while keeping the original TypeScript workbench as the front‑end.
Installer size reduced from 797 MB to 16 MB (≈96 % shrinkage).
Target idle memory on macOS is under 200 MB.
Core Replacement Strategy
Chromium → system WebView (WKWebView on macOS, WebView2 on Windows).
Node.js API → Rust standard library.
node‑pty → portable-pty.
sqlite3 → rusqlite.
IPC → Tauri invoke.
Implemented Features
Editor : Monaco with syntax highlighting and basic IntelliSense.
File Management : Open, create, delete, rename, and file‑watching.
Terminal : Full PTY support via portable-pty, automatic shell detection, window resize, and signal handling.
Git : Status, diff, log, stage, commit, branch, push/pull/fetch, stash, reset (covers roughly 90 % of daily operations).
Search : Full‑text search backed by a Rust index using dashmap, rayon, and regex for parallel execution.
Themes : Built‑in VS Code themes.
Extensions : Install from the Open VSX registry.
Storage : SQLite via rusqlite with auto‑save, undo/redo.
Features Still Under Development
Extension host.
Debugger.
Rust’s Role in SideX
File System : std::fs for read/write; notify crate for file watching (macOS uses FSEvents).
Terminal (PTY) : portable-pty provides a real shell, interactive sessions, automatic shell detection, and resize events.
Git Layer : Implements a complete Git command set covering the majority of everyday development tasks.
Search System : Parallel search using dashmap + rayon + regex, with a fast Rust‑based backend index.
Local Storage : SQLite accessed through rusqlite.
Local Deployment (Step‑by‑Step)
Environment Preparation : Install Rust, Node.js, and Tauri dependencies. Platform‑specific tools:
Windows → Visual Studio Build Tools
macOS → Xcode CLI
Linux → webkit2gtk, SSL, etc.
Clone Repository :
git clone https://github.com/Sidenai/sidex.git
cd sidex
npm installRun in Development Mode : npm run tauri dev On Linux, if a white screen appears, use:
WEBKIT_DISABLE_DMABUF_RENDERER=1 npm run tauri devBuild (increase Node memory):
# macOS / Linux
NODE_OPTIONS="--max-old-space-size=12288" npm run build
# Windows (PowerShell)
$env:NODE_OPTIONS="--max-old-space-size=12288"
npm run build
npx tauri buildFirst Rust compilation takes 5–10 minutes.
Front‑end compilation requires >12 GB RAM.
No pre‑compiled binaries are provided; build from source.
Performance Comparison: SideX vs. Electron
Installer size : VS Code 797 MB → SideX 16 MB.
Browser engine : VS Code uses built‑in Chromium; SideX uses the system WebView.
Backend : VS Code runs on Node.js; SideX runs on Rust.
Idle memory target : VS Code >1 GB; SideX <200 MB on macOS.
Key Advantages
Installation size reduced by 96 %.
Faster startup.
Multiple applications can share the system WebView kernel.
Rust backend offers more predictable performance.
Repository
https://github.com/Sidenai/sidexSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Full-Stack Cultivation Path
Focused on sharing practical tech content about TypeScript, Vue 3, front-end architecture, and source code analysis.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
