Welcome to Rest, a high-performance TypeScript compiler built with Rust and OXC, designed for 100% compatibility with VSCode's build process. Rest is one of the five Elements in the CodeEditorLand architecture, responsible for compilation and build tooling. It replaces esbuild's TypeScript loader with a Rust-powered compiler that produces VSCode-compatible output.
Rest is engineered to:
- Deliver High Performance: Compile TypeScript 2-3x faster than esbuild using OXC.
- Ensure VSCode Compatibility: Produce byte-for-byte identical output to VSCode's gulp build.
- Provide Memory Safety: Leverage Rust's ownership model for deterministic performance without garbage collection.
- Support Modern Tooling: Built on OXC 0.48, the latest TypeScript infrastructure.
- Full TypeScript 5.x Support: Complete compatibility with TypeScript 5.x syntax and features.
- Decorator Handling: Proper support for
emitDecoratorMetadataand decorator transformations. - Class Fields Control: Configurable
useDefineForClassFieldsbehavior (VSCode default: false). - Parallel Compilation: Optional
--Parallelflag for multi-core compilation. - Directory-Based Compilation: Process entire directory structures with preserved layout.
- Comprehensive Error Reporting: Detailed error messages with source location information.
- Compilation Metrics: Built-in tracking of compilation count, elapsed time, and error counts.
- Source Map Generation: Planned support for source maps (in progress).
| Principle | Description | Key Components Involved |
|---|---|---|
| Performance | Rust + OXC delivers 2-3x faster compilation than esbuild. | OXC Parser, Transformer, Codegen |
| Compatibility | OXC is used by VSCode internally, ensuring 1:1 output compatibility. | OXC 0.48, VSCode build process |
| Memory Safety | No garbage collection, deterministic performance through Rust ownership. | Rust lifetime management |
| Modern Tooling | Built on the latest OXC infrastructure for TypeScript compilation. | OXC 0.48+ |
To understand how Rest's internal components interact to provide
high-performance TypeScript compilation, see the following source files:
Source/Library.rs- Binary entry pointSource/Fn/OXC/Compiler.rs- Main compiler orchestrationSource/Fn/OXC/Parser.rs- OXC parser wrapperSource/Fn/OXC/Transformer.rs- AST transformationSource/Fn/OXC/Codegen.rs- Code generationSource/Struct/CompilerConfig.rs- Advanced configuration
The source files explain the OXC-based compilation pipeline, decorator handling, and VSCode compatibility transformations.
| Component | Role & Key Responsibilities |
|---|---|
| Rest Compiler | High-performance TypeScript to JavaScript compilation. |
| RestPlugin | esbuild plugin that integrates Rest into the build pipeline. |
| Build System | Environment-driven compiler selection (esbuild or Rest). |
See CHANGELOG.md for a
history of changes to this component.
This project is released into the public domain under the Creative Commons CC0
Universal license. You are free to use, modify, distribute, and build upon
this work for any purpose, without any restrictions. For the full legal text,
see the LICENSE file.
Rest is a core element of the Land ecosystem. This project is funded through NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.
| Land | PlayForm | NLnet | NGI0 Commons Fund |
|---|---|---|---|
|
|
|
|
|
Project Maintainers: Source Open (Source/Open@Editor.Land) | GitHub Repository | Report an Issue | Security Policy