SideX – 一个基于 Tauri 的 Visual Studio Code 移植版
SideX – A Tauri-based port of Visual Studio Code

原始链接: https://github.com/Sidenai/sidex

## SideX:一个轻量级的 VSCode 移植 SideX 是一个早期发布、开源项目,旨在以更小的体积重现 Visual Studio Code 的功能。它通过用 Tauri(一个基于 Rust 的后端和原生 webview)取代 Electron 来实现这一点,从而获得更快的性能和更低的资源占用(目标是 200MB 内存)。 该项目是对 VSCode 的 1:1 架构的精简移植,使用了超过 5600 个 TypeScript 文件,并使其能够在原生 shell 上运行。目前,Monaco 编辑器、文件资源管理器、集成终端、基本的 Git 集成和主题支持等核心功能已经可用,并且支持从 Open VSX 加载扩展。 然而,SideX 仍在积极开发中。许多工作台功能尚不完整,扩展兼容性有限,调试/设置界面不稳定。 开发者正在积极寻求社区贡献,以解决错误、实现功能(尤其是终端、扩展和调试),并改进平台支持。如果您熟悉 VSCode 的架构,鼓励您参与贡献!您可以在 GitHub 上找到该项目和贡献指南:[https://github.com/Sidenai/sidex](https://github.com/Sidenai/sidex)。

## SideX:一个注重轻量级性能的 VS Code 移植版 SideX 是一个基于 Tauri 的 Visual Studio Code 移植版,旨在显著降低 RAM 占用量,目标为 200MB。该项目在 Hacker News 上引发了争论,讨论的中心在于 Tauri 是否真正能兑现其性能承诺,以及该项目是否更多的是“炒作代码”而非实质内容。 许多评论者质疑 Tauri 的原生性能声明,指出潜在的 RAM 使用问题以及该项目对 Web 视图中 TypeScript 的大量依赖。人们对 README 的清晰度表示担忧,并质疑该项目是否真正可用,还是仅仅停留在设想阶段。 虽然有些人赞赏创建轻量级编辑器并利用 AI 进行开发的努力,但另一些人持怀疑态度,指出 VS Code 已经进行了性能改进,并且复制其庞大的扩展生态系统面临挑战。创建者通过更新 README 以提高清晰度,并承认为完全支持扩展仍需付出努力。最终,该项目的成功取决于提供一个稳定、可用的编辑器,并实现其性能目标。
相关文章

原文

A Tauri-based port of Visual Studio Code. Same architecture, native performance, fraction of the size.

Early Release — This project is in active development. Many features are not fully working yet. We're releasing early because a lot of people wanted to help build this out. If you're into open source and want to help make a lightweight, native code editor a reality, you're in the right place.

SideX is a 1:1 architectural port (HEAVILY STRIPPED) of VSCode that replaces Electron with Tauri (Rust backend + native webview). The entire VSCode workbench - editor, terminal, extensions, themes, keybindings — ported to run on a native shell.

  • 5,600+ TypeScript files from VSCode's source, ported and adapted
  • Rust backend replacing Electron's main process
  • Zero Electron imports remaining in the codebase
  • Lightweight — fraction of VSCode's install size

Goal: 200mb RAM usage.

This is an early release. Here's an honest look at where things stand:

Working:

  • Core editor (Monaco) with syntax highlighting, IntelliSense basics
  • File explorer — open folders, create/edit/delete files
  • Integrated terminal (PTY via Rust)
  • Basic Git integration
  • Theme support
  • Native menus
  • Extension loading from Open VSX

In Progress / Unstable:

  • Many workbench features are stubbed or partially implemented
  • Extension host is early-stage — not all extensions will work
  • Debugging support is scaffolded but incomplete
  • Settings/keybindings UI may have rough edges
  • Some platform services are placeholder implementations
  • Multi-window support is limited

We need help across the board. See Contributing below.

# Clone the repo
git clone https://github.com/Sidenai/sidex.git
cd sidex

# Install dependencies
npm install

# Start dev server with hot reload
npm run tauri dev

Building from source (not distributing pre-built binaries yet):

# Install dependencies (if not already done)
npm install

# Build the frontend (increase memory for large codebase)
# 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

# Build the Tauri app (takes 5-10 minutes)
npx tauri build

Linux blank screen: If you get a blank/white screen on Linux, run with:

WEBKIT_DISABLE_DMABUF_RENDERER=1 npm run tauri dev

SideX preserves VSCode's layered architecture and replaces the Electron runtime with Tauri:

VSCode (Electron)                    SideX (Tauri)
─────────────────                    ─────────────
Electron Main Process            →   Tauri Rust Backend
  BrowserWindow                  →   WebviewWindow
  ipcMain / ipcRenderer          →   invoke() + events
  Node.js APIs (fs, pty, etc.)   →   Rust commands (std::fs, portable-pty)
  Menu / Dialog / Clipboard      →   Tauri plugins

Renderer (DOM + TypeScript)      →   Same (runs in native webview)
Extension Host                   →   Sidecar process (in progress)
sidex/
├── src/                    # TypeScript frontend (VSCode workbench)
│   ├── vs/
│   │   ├── base/           # Foundation utilities
│   │   ├── platform/       # Platform services (DI)
│   │   ├── editor/         # Monaco editor
│   │   ├── workbench/      # IDE shell, features, services
│   │   └── code/           # Application entry
│   └── main.ts             # Frontend entry point
├── src-tauri/              # Rust backend
│   ├── src/
│   │   ├── commands/       # fs, terminal, search, git, window, etc.
│   │   ├── lib.rs          # App setup, menu, command registration
│   │   └── main.rs         # Entry point
│   └── Cargo.toml
├── index.html              # HTML shell
├── vite.config.ts          # Vite config (port 1420)
└── package.json

For a deep dive into the architecture, see ARCHITECTURE.md.

We want your help. Seriously.

This project was released early specifically so the community can help build it out. There's a ton of work to do — from fixing bugs to implementing entire subsystems.

  1. Fork the repo and create a branch for your work
  2. Pick something — check the Issues tab, or just find something broken and fix it
  3. Submit a PR — we'll review it, and if it gets merged, you'll be added as a contributor
  • Terminal — Shell integration, profile detection, stability
  • Extensions — Extension host compatibility, API coverage
  • File System — Watcher reliability, large file handling
  • Editor — IntelliSense integration, language services
  • Debugging — Debug adapter protocol implementation
  • Settings — Settings UI, keybinding editor
  • Search — Workspace search reliability and performance
  • Platform — Windows and Linux testing and fixes
  • UI Polish — Layout issues, theming gaps, accessibility
  • The codebase follows VSCode's patterns — if you've worked on VSCode, you'll feel right at home
  • TypeScript imports use .js extensions (ES modules)
  • Services use VSCode's dependency injection with @inject decorators
  • Rust commands are in src-tauri/src/commands/ — add new ones and register in lib.rs
  • See AGENTS.md for a detailed guide to the codebase (useful for AI-assisted development too)
Layer Technology
Frontend TypeScript, Vite 6, Monaco Editor, xterm.js
Backend Rust, Tauri 2, portable-pty, rusqlite, tokio
Editor Monaco (from VSCode source)
Terminal xterm.js + Rust PTY via portable-pty
Extensions Open VSX registry
Storage SQLite (via rusqlite)

MIT - This project is a port of Visual Studio Code (Code - OSS), which is licensed under the MIT License. See LICENSE for details.

联系我们 contact @ memedata.com