Skip to main content

SHEET 06 OF 41

/DOC/:SLUG

PART:
03 DOCUMENTATION
CIRCULATION:
PUBLIC
SOURCE:
pages/Doc/[...Slug].astro
AS OF:
2026-12-02

Rest is a high-performance TypeScript compiler built on the OXC (Oxidation Compiler) toolchain. It replaces esbuild's TypeScript loader with a Rust-powered OXC pipeline, producing VS Code-compatible output at 2-3x speed improvement.

/Elements

Rest

Rest is a high-performance TypeScript compiler built on the OXC (Oxidation Compiler) toolchain. It replaces esbuild's TypeScript loader with a Rust-powered OXC pipeline, producing VS Code-compatible output at 2-3x speed improvement.

PUBLISHED ELEMENTS Source/Content/doc/rest.md UNAVAILABLE UNAVAILABLE ARCHITECTURE 9

STATUS UNAVAILABLE NEXT OPEN THE ELEMENT'S MANUAL - IT DESCRIBES THE THING THE CAPTURE WOULD HAVE SHOWN.

# PLATE_01 / REST

FIGURE: The capture this record's evidence would show: parallel tool paths in macro.

This element has no evidence manifest in the build, so there is no capture to describe. The record above still prints its working - form, boundary, dependencies, manual and trace - and none of those fields is a picture.

SUBJECT:
PARALLEL TOOL PATHS IN MACRO
MANIFEST:
UNAVAILABLE
STATE:
UNAVAILABLE
PLATE:
UNAVAILABLE

SOURCE: SOURCE/CONTENT/ELEMENT/WORKING.TS

Rest is a high-performance TypeScript compiler built on the OXC (Oxidation Compiler) toolchain:

  • Replaces esbuild’s TypeScript loader with a Rust-powered OXC pipeline
  • Produces VS Code-compatible output at 2-3x speed improvement
  • Handles decorators, class field transformations, JSX, and type stripping

Overview 📋

Rest is a Rust binary and library that provides a TypeScript-to-JavaScript compiler using the OXC toolchain:

  • Handles decorators, class field transformations, JSX, and TypeScript type stripping
  • Produces output compatible with VS Code’s module system
  • Integrates with Output’s build pipeline via RestPlugin
Attribute Value
Language Rust (edition 2024)
Crate type Binary + Library
OXC version 0.48+
Dependencies oxc_allocator, oxc_parser, oxc_transformer, oxc_codegen, oxc_semantic, oxc_span, oxc_ast, Common, clap, rayon
Consumed by Output (optional RestPlugin)

Architecture 🏗️

Mermaid diagram

Module Map 🗺️

Path Purpose
Source/Binary.rs Binary entry point
Source/Fn/Build.rs Build pipeline orchestration
Source/Fn/Bundle/ Module bundling
Source/Fn/Transform/ TypeScript transformation pipeline
Source/Fn/OXC/ OXC compiler integration
Source/Fn/SWC/ SWC transformer path
Source/Fn/Worker/ Parallel worker pool
Source/Fn/NLS/ Natural language search integration
Source/Fn/Binary/ Binary-output helpers
Source/Struct/CompilerConfig.rs Compiler configuration types
Source/Struct/SWC.rs SWC configuration types
Source/Library.rs Library root for integration
Source/Main.rs Alternative entry point

Compilation Pipeline 🔧

The OXC compilation pipeline processes TypeScript input through multiple stages:

Mermaid diagram

Parallel Processing ⚡

Rest uses rayon for parallel file compilation:

// Worker pool processes files in parallel
input_files.par_iter().map(|file| {
    compile_file(file, &config)
}).collect::<Result<Vec<Output>>>()

By default, one worker per logical CPU core is used. This can be overridden with the --workers N flag.


Configuration ⚙️

Rest reads configuration from CLI flags and environment variables:

Flag Env Variable Default Description
--entry REST_ENTRY (required) Entry point file or directory
--out-dir REST_OUT_DIR dist/ Output directory
--target REST_TARGET es2022 Target ECMAScript version
--sourcemap REST_SOURCEMAP false Generate source maps
--minify REST_MINIFY false Minify output
--workers REST_WORKERS CPU count Parallel worker count
--decorators REST_DECORATORS legacy Decorator metadata mode
--class-fields REST_CLASS_FIELDS define Class field emit mode

Output Configuration 📝

rest --entry src/index.ts \
	--out-dir lib/ \
	--target es2022 \
	--sourcemap \
	--decorators legacy

CLI Usage 💻

# Single file compilation
rest --entry src/index.ts --out-dir dist/

# Directory compilation (parallel)
rest --entry src/ --out-dir dist/ --workers 8

# Minified production build
rest --entry src/index.ts --out-dir dist/ --minify --target es2021

# With source maps
rest --entry src/index.ts --out-dir dist/ --sourcemap

# Custom decorator behavior
rest --entry src/index.ts --out-dir dist/ --decorators stage3

Integration with Output 🔗

Rest integrates with the Output element’s build pipeline through the RestPlugin:

// Output/ESBuild/RestPlugin.ts
import { rest } from "@codeeditorland/rest";

export function RestPlugin(): ESBuild.Plugin {
	return {
		name: "rest",
		setup(build) {
			build.onLoad({ filter: /\.ts$/ }, async (args) => {
				const result = await rest.compile(args.path, {
					target: "es2022",
					sourcemap: true,
				});
				return {
					contents: result.code,
					loader: "js",
				};
			});
		},
	};
}

Note

Activated via environment variable: Compiler=Rest


Performance Benchmarks 📊

Operation esbuild Rest (OXC) Improvement
Parse + transform 1000 files 2.4s 0.9s 2.7x
Full bundle (100K LOC) 1.8s 0.7s 2.6x
Minified bundle 3.1s 1.3s 2.4x
Source map generation 0.8s 0.4s 2.0x

Benchmarks performed on Apple M1 Max with 8 worker threads.



Project Maintainers: Source Open (Source/[email protected]) | GitHub Repository | Report an Issue

The record this page documents, as the site files it: the six facts the claim is checked against, and the three files the manual names to check it.

WORKING, 06

FORM:
COMPILER PIPELINE
WRITTEN IN:
RUST OXC
BOUNDARY:
IN-PROCESS
DEPENDS ON:
NONE
EVIDENCE:
UNAVAILABLE NO MANIFEST IN THE BUILD

# TRACE / REST 03 STEPS

  1. 01 Source/Fn/OXC/Compiler.rs THE COMPILER
  2. 02 Source/Fn/OXC/Codegen.rs CODEGEN
  3. 03 Source/Fn/Bundle.rs THE BUNDLE

SOURCE: /DOC/DEEP-DIVE-REST

Elements, 17 PAGES, page 11 of 17

THE LAYER'S INDEX

NEXT: /BLOG 04 BLOG

NOTES FROM THE BUILD, NEWEST FIRST

〈06〉 /DOC/:SLUG 41 SHEETS AS OF: 2026-12-02