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 TypeScript compiler architecture, OXC toolchain pipeline, key modules, data flow, integration points with Output/Cocoon/Sky, and configuration reference.

/Deep Dive

Rest - Deep Dive

Rest TypeScript compiler architecture, OXC toolchain pipeline, key modules, data flow, integration points with Output/Cocoon/Sky, and configuration reference.

PUBLISHED DEEP DIVE Source/Content/doc/deep-dive-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 provides the technical foundation for the TypeScript compiler within the Land project. Rest is a Rust binary that uses the OXC toolchain to compile TypeScript 2-3x faster than esbuild while producing output compatible with VS Code’s build process.


Architecture

Rest is structured as a Rust library with a binary entry point. The compilation pipeline passes source files through OXC’s parser, transformer, and code generator in sequence. An optional parallel mode processes multiple files concurrently across CPU cores.

Mermaid diagram

Key Modules

Path Description
Source/Binary.rs Binary entry point; parses CLI arguments and dispatches to the compiler
Source/Library.rs Library root for integration
Source/Fn/OXC/Compiler.rs Main compilation orchestrator; coordinates parser, transformer, and codegen
Source/Fn/OXC/Parser.rs Wraps oxc_parser with error normalization and source tracking
Source/Fn/OXC/Transformer.rs Applies TypeScript-to-JavaScript AST transformations including decorators
Source/Fn/OXC/Codegen.rs Generates final JavaScript text from the transformed AST
Source/Fn/Build.rs Directory-based compilation: walks source trees preserving structure
Source/Fn/Bundle/ Bundling utilities for multi-file outputs
Source/Fn/NLS/ Natural Language Support string extraction
Source/Fn/SWC/ SWC integration shims (alternative transformer path)
Source/Fn/Worker/ Worker thread support for parallel compilation
Source/Struct/CompilerConfig.rs Configuration struct: decorator mode, class fields, source maps
Source/Struct/SWC.rs SWC-specific configuration types

Data Flow

Mermaid diagram

Note

When --Parallel is specified, the compiler fans out file compilation across Tokio worker threads and collects aggregated metrics.


Integration Points

Connecting Element Direction Mechanism Description
Output Consumer Process invocation / esbuild plugin Output’s RestPlugin.ts invokes the Rest binary or calls it via plugin API
Cocoon Indirect consumer Compiled artifacts Cocoon loads the JavaScript produced by Rest from Target/Microsoft/VSCode/
Sky Indirect consumer @codeeditorland/output package Sky loads VS Code UI components compiled through the Rest pipeline

Configuration

Option CLI Flag / Variable Default Description
Input path --Input required Directory or file to compile
Output path --Output required Destination directory for compiled JavaScript
Parallel mode --Parallel off Enable multi-core parallel compilation
Decorator metadata CompilerConfig true Emit emitDecoratorMetadata for VS Code compatibility
Class fields mode CompilerConfig false (VS Code default) useDefineForClassFields - off matches VS Code’s gulp build
Source maps CompilerConfig development only Inline source maps for debug builds

The CompilerConfig struct is populated from either CLI flags or from the esbuild plugin context when Rest is invoked as a plugin within the Output build pipeline.

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
MANUAL:
/DOC/DEEP-DIVE-REST
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

Deep Dive, 15 PAGES, page 9 of 15

THE LAYER'S INDEX

NEXT: /BLOG 04 BLOG

NOTES FROM THE BUILD, NEWEST FIRST

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