Welcome to Output, the build output and artifact management package for the Land Code Editor. Output handles the compilation, processing, and distribution of source code from various dependencies including VSCode, CodeEditorLand Editor, and the Rest compiler pipeline.
Output is engineered to:
- Orchestrate Multi-Compiler Builds: Support both esbuild and Rest (OXC-based) compilation pipelines with seamless integration.
- Manage Build Artifacts: Organize and deliver optimized JavaScript
artifacts for consumption by
Sky,Wind, andCocoon. - Provide Hybrid Workflows: Enable incremental migration from esbuild to Rest through conditional compilation and plugin-based architecture.
- Ensure Build Reproducibility: Maintain consistent output through deterministic build configurations and artifact verification.
- Dual-Compiler Support: Seamlessly switch between esbuild (default) and Rest (OXC-powered) compilers via environment variables.
- Rest Plugin Integration: Custom esbuild plugin that intercepts TypeScript compilation and delegates to the Rest compiler.
- Source Map Generation: Full support for development source maps with configurable generation strategies.
- Artifact Merging: Intelligent merging of Rest compiler output with esbuild bundles for hybrid workflows.
- Verbose Logging: Comprehensive build diagnostics with configurable verbosity levels for troubleshooting.
- Path Override: Flexible binary path configuration for Rest compiler discovery in diverse environments.
| Principle | Description | Key Components Involved |
|---|---|---|
| Compatibility | Maintain backward compatibility with esbuild while enabling Rest compiler adoption through plugin architecture. | Source/ESBuild/RestPlugin.ts, Source/prepublishOnly.sh |
| Modularity | Separation of concerns between build orchestration, compiler plugins, and artifact management. | Source/ESBuild/Output.ts, Source/ESBuild/RestPlugin.ts |
| Performance | Leverage Rest's OXC-based compiler for 10-100x speedup on TypeScript transpilation tasks. | Rest compiler integration, parallel processing |
| Flexibility | Environment-driven configuration enables different build strategies per deployment scenario. | Compiler environment variable, REST_* variables |
| Observability | Comprehensive logging and diagnostics for build process visibility and troubleshooting. | REST_VERBOSE, REST_OPTIONS configuration |
The Rest compiler integration enables OXC-based TypeScript compilation as an alternative or complement to esbuild. This section provides an overview of the integration architecture, usage patterns, and comparison with esbuild.
Rest leverages the OXC (Oxidation Compiler) ecosystem, a high-performance JavaScript/TypeScript toolchain written in Rust. The OXC stack provides:
oxc_parser: Ultra-fast JavaScript/TypeScript parser with ESTree compatibilityoxc_transformer: AST transformation engine supporting TypeScript, JSX, and modern ECMAScript featuresoxc_codegen: Efficient code generation from ASToxc_semantic: Semantic analysis and symbol table construction
When Compiler=Rest is configured, the build pipeline intercepts TypeScript
file processing and delegates to the Rest compiler before merging results back
into the esbuild output stream.
Source/ → esbuild → Configuration/ → Target/
Source/ → esbuild → Configuration/ → Target/
Dependency/ → Rest → Target/Rest/ → Configuration/ → Target/
Set the Compiler environment variable to Rest before invoking the build:
# Use Rest compiler for TypeScript transpilation
export Compiler=Rest
npm run prepublishOnlyexport NODE_ENV=development
export Compiler=Rest
npm run Runexport NODE_ENV=production
export Compiler=Rest
npm run prepublishOnlyRest compiler output is placed in the following location before being processed:
Target/Rest/Microsoft/VSCode/
After Rest processing, artifacts are merged into the final output at:
Target/Microsoft/VSCode/
| Variable | Default | Description |
|---|---|---|
Compiler |
esbuild |
Compiler to use (esbuild or Rest) |
REST_BINARY_PATH |
auto-detect | Override Rest binary location |
REST_OPTIONS |
empty | Additional Rest compiler flags |
REST_VERBOSE |
false |
Enable verbose Rest logging |
Dependency |
Microsoft/VSCode |
Source dependency to process |
NODE_ENV |
production |
Build environment (development or production) |
| Feature | esbuild | Rest (OXC) |
|---|---|---|
| Implementation | Go-based | Rust-based (OXC) |
| TypeScript Support | Full | Full |
| Speed | Very Fast (10-100x tsc) | Ultra-Fast (parallel, OXC) |
| Source Maps | Yes | Yes |
| Tree Shaking | Yes | Yes |
| Plugin System | Rich ecosystem | Emerging |
| Best For | General bundling | TypeScript-heavy projects |
| Watch Mode | Yes | Yes (via notify) |
| Minification | Yes | Yes (oxc_minifier) |
[!NOTE] Use Rest compiler when:
- Your project has heavy TypeScript usage
- You need maximum build performance
- You want to leverage OXC's semantic analysis
- You're building for production with minification requirements
[!TODO] Consider esbuild when:
- You rely on specific esbuild plugins
- Your project is primarily JavaScript
- You need mature plugin ecosystem support
- Build speed is less critical than compatibility
Set REST_BINARY_PATH to the location of the Rest binary:
export REST_BINARY_PATH=/usr/local/bin/restEnable verbose logging for detailed Rest compiler output:
export REST_VERBOSE=trueEnsure development mode or explicit source map configuration:
export NODE_ENV=developmentSource/ → esbuild → Configuration/ → Target/
When using the Rest compiler (Compiler=Rest), an additional stage is added:
Source/ → esbuild → Configuration/ → Target/
Dependency/ → Rest → Target/Rest/ → Configuration/ → Target/
Element/Output/
├── Source/
│ ├── ESBuild/
│ │ ├── Output.ts # ESBuild configuration
│ │ └── RestPlugin.ts # Rest compiler plugin
│ ├── prepublishOnly.sh # Build orchestration
│ └── Run.sh # Development watch script
├── Configuration/
│ └── ESBuild/
│ ├── Microsoft/VSCode.js
│ └── CodeEditorLand/Editor.js
├── Target/
│ ├── Rest/ # Rest compiler output (when Compiler=Rest)
│ │ └── Microsoft/
│ │ └── VSCode/
│ └── Microsoft/ # Final merged output
│ └── VSCode/
└── package.json
| Script | Description |
|---|---|
npm run prepublishOnly |
Run full build process |
npm run Run |
Run in watch mode (development) |
Source/ESBuild/Output.ts configures esbuild with:
- ESM format output
- Node.js platform
- ES Next target
- Conditional Rest plugin integration
Source/ESBuild/RestPlugin.ts provides:
- TypeScript file interception
- Rest compiler invocation
- Source map generation (when enabled)
- Fallback to esbuild on errors
pnpm add @codeeditorland/output# Default esbuild build
npm run prepublishOnly
# Rest compiler build
export Compiler=Rest
npm run prepublishOnlyThis project leverages the Depth-Aware Skill System for efficient development workflows. The system adapts skill behavior based on usage frequency, providing quick initial checks and progressively more comprehensive analysis.
- Level 1 (First Run): Quick scan - fastest execution, focused scope
- Level 2 (Second Run): Detailed analysis - broader coverage
- Level 3 (Third Run): Deep dive - comprehensive review
- Level 4 (Fourth+ Run): Strategic analysis - system-wide patterns
For detailed guidance on using the depth-aware skill system, see:
Documentation/SkillSystem.md- Complete system overview.roo/skills/DEPTH-MANAGEMENT.md- Technical management guide
| Task | Command | Depth Level |
|---|---|---|
| Quick build verification | workflow-check-build-status |
Level 1 |
| Rest compiler integration | workflow-rest-compiler-integration |
Level 2 |
| Output directory structure review | history-output-directory-structure |
Level 3 |
| Architecture documentation sync | knowledge-element-architecture |
Level 4 |
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.
Stay updated with our progress! See CHANGELOG.md for a
history of changes specific to Output.
Output 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