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.

Full-Stack Cultivation Path
Full-Stack Cultivation Path
Full-Stack Cultivation Path
How SideX Replaces VS Code’s Electron Core with Tauri + Rust to Shrink Install Size to 16 MB

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 install

Run in Development Mode : npm run tauri dev On Linux, if a white screen appears, use:

WEBKIT_DISABLE_DMABUF_RENDERER=1 npm run tauri dev

Build (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 build

First 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/sidex
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performanceRustElectronTauriDesktop ApplicationVS Code
Full-Stack Cultivation Path
Written by

Full-Stack Cultivation Path

Focused on sharing practical tech content about TypeScript, Vue 3, front-end architecture, and source code analysis.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.