Skip to content

CodeEditorLand/Rest

Rest

⛱️

+

🏞️


Rest ⛱️ The High-Performance TypeScript Compiler for Land 🏞️

License: CC0-1.0 Rust Version OXC Version

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:

  1. Deliver High Performance: Compile TypeScript 2-3x faster than esbuild using OXC.
  2. Ensure VSCode Compatibility: Produce byte-for-byte identical output to VSCode's gulp build.
  3. Provide Memory Safety: Leverage Rust's ownership model for deterministic performance without garbage collection.
  4. Support Modern Tooling: Built on OXC 0.48, the latest TypeScript infrastructure.

Key Features 🔐

  • Full TypeScript 5.x Support: Complete compatibility with TypeScript 5.x syntax and features.
  • Decorator Handling: Proper support for emitDecoratorMetadata and decorator transformations.
  • Class Fields Control: Configurable useDefineForClassFields behavior (VSCode default: false).
  • Parallel Compilation: Optional --Parallel flag 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).

Core Architecture Principles 🏗️

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+

Deep Dive & Component Breakdown 🔬

To understand how Rest's internal components interact to provide high-performance TypeScript compilation, see the following source files:

The source files explain the OXC-based compilation pipeline, decorator handling, and VSCode compatibility transformations.


Rest in the Land Ecosystem ⛱️ + 🏞️

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).

Changelog 📜

See CHANGELOG.md for a history of changes to this component. 


License ⚖️

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.


Funding & Acknowledgements 🙏🏻

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
Land PlayForm NLnet NGI0 Commons Fund

Project Maintainers: Source Open (Source/Open@Editor.Land) | GitHub Repository | Report an Issue | Security Policy

About

Rest ⛱️ + Land 🏞️

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors