Repository navigation
Proposal: Native Rust-based JS/TS Engine in Zed — Embedding & Adapting Open-Source Tooling (Bun's check/lint/fmt) for Zero-Overhead Developer Experience #66376
Closed
rihadjahanopu
started this conversation in
Feature Requests
Replies: 1 comment
|
Zed code is language agnostic and does not aim to replicate language server functionality in any way, as it's a very hard task on itself. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Body
Hi Zed Team,
First of all, thank you for creating such an exceptionally fast, GPU-accelerated, Rust-native editor. The responsiveness and overall UX of Zed have been a game-changer!
As web developers, TypeScript and JavaScript form a massive part of our daily workflows. However, under the hood, Zed currently relies on traditional Language Server Protocol (LSP) implementations like
tsserverorvtslsrunning on top of an external Node.js process. In large-scale applications or monorepos, this background Node process frequently becomes a heavy memory hog and CPU bottleneck—which slightly diverges from Zed's core philosophy of being an ultra-lightweight, native binary.💡 The Core Proposal
Since modern JavaScript/TypeScript runtimes like Bun feature high-performance, open-source checking, linting, and formatting tools written in low-level systems languages Rust, could Zed consider directly embedding, adapting, or natively integrating these Rust/Zig-based parser and toolchain logics (e.g., modifying
bun check,bun lint, andbun fmt) straight into Zed's engine?Instead of merely spawning external processes over IPC, Zed could natively adopt or statically link adapted versions of these open-source Rust-native JS/TS tools for instant diagnostics, linting, formatting, and type-checking.
🚀 Key Performance Improvements & Benefits
Massive Reduction in RAM and CPU Overhead:
tsserverrunning inside Node.js can easily consume 1GB to 3GB+ of RAM on large codebases.Near-Zero Latency Diagnostics & Instant Formatting:
bun fmtlogic) and linting (bun lintlogic) can occur in real-time as you type, without any noticeable lag or delay.Instant Startup & No Language Server Freezes:
Language Server: Restartwhentsservercrashes or gets stuck indexing.Battery & Thermal Efficiency on Laptops:
🔍 Architectural Advantages for Zed
To keep this proposal realistic, here are a few technical challenges that the team might need to consider:
tsc/tsserverevolves constantly. Ensuring 100% type inference parity with complex TS generics or edge-case declarations using alternative native engines requires ongoing maintenance.💬 Conclusion
Integrating or adapting native, open-source JS/TS checking and formatting logic directly into Zed’s Rust codebase could redefine web development standards—offering an unprecedented, zero-overhead TypeScript experience.
We would love to hear the core team's thoughts on whether exploring native JS/TS toolchain embedding aligns with Zed's long-term roadmap!
All reactions