oxc-project/oxc
⚓ A collection of high-performance JavaScript tools.
Collection of high-performance JavaScript/TypeScript tools written in Rust
Data flows from source code through parsing, semantic analysis, transformation/linting/formatting, and code generation stages.
Under the hood, the system uses 2 feedback loops, 2 data pools, 3 control points to manage its runtime behavior.
Structural Verdict
A 10-component dev tool with 0 connections. 5176 files analyzed. Minimal connections — components operate mostly in isolation.
How Data Flows Through the System
Data flows from source code through parsing, semantic analysis, transformation/linting/formatting, and code generation stages.
- Source Input — JavaScript/TypeScript source code and filename provided to parsing functions
- Parsing — Source code parsed into AST using oxc_parser with configurable language features (config: tasks.vp:build-oxlint.command)
- Semantic Analysis — AST analyzed for scoping, symbol resolution, and type information using oxc_semantic
- Processing — AST transformed via linting rules, formatting, minification, or code transformation (config: tasks.vp:fmt.command, tasks.vp:lint.command)
- Code Generation — Processed AST converted back to source code with optional sourcemaps
System Behavior
How the system actually operates at runtime — where data accumulates, what loops, what waits, and what controls what.
Data Pools
Parsed AST structures held in memory during processing pipeline
Conformance test results accumulated in snapshot files
Feedback Loops
- Conformance Testing Loop (convergence, balancing) — Trigger: Test case execution in transform_conformance. Action: Compare Oxc output against Babel expected results. Exit: All test cases processed or filter criteria met.
- ESLint Rule Testing Loop (convergence, balancing) — Trigger: RuleTester execution in conformance testing. Action: Validate Oxc linter output against ESLint expected results. Exit: All rule tests completed.
Delays & Async Processing
- NAPI Module Loading (async-processing) — Platform-specific native module resolution and loading
- Lazy Feature Loading (async-processing) — Raw transfer and experimental features loaded on first use
Control Points
- Platform Detection (runtime-toggle) — Controls: Which native binary to load based on OS and architecture
- Memory Allocator Feature (feature-flag) — Controls: Whether to use custom mimalloc allocator. Default: enabled on supported platforms
- Experimental Raw Transfer (feature-flag) — Controls: Use optimized raw memory transfer for AST data. Default: opt-in via options.experimentalRawTransfer
Package Structure
This monorepo contains 11 packages:
Formatter CLI application that formats JavaScript/TypeScript code
Linter CLI application with conformance testing for ESLint rule compatibility
Node.js bindings for JavaScript minification via NAPI
Node.js bindings for parsing JavaScript/TypeScript with raw transfer optimization
All-in-one Node.js binding combining parsing, linting, formatting, and minification
Node.js bindings for TypeScript/JSX transformation and isolated declarations
TypeScript definitions for Oxc AST nodes and structures
JavaScript runtime helpers for transformed code
End-to-end testing applications like NestJS integration tests
Babel transformation conformance testing against official test suites
Browser compatibility data generation for ES features and engine targets
Technology Stack
Core implementation language
Node.js native addon framework
Type definitions and tooling
Package manager and workspace tool
High-performance memory allocator
Async runtime for Rust
Serialization framework
Directory traversal
Key Components
- FormatCommand (cli-command) — Main CLI command handler for the oxfmt formatter application
apps/oxfmt/src/cli/command.rs - TEST_GROUPS (config) — Configuration array defining ESLint rule test groups for conformance testing
apps/oxlint/conformance/src/groups/index.ts - minify_impl (function) — Core minification function that parses, minifies, and generates optimized JavaScript code
napi/minify/src/lib.rs - parse_impl (function) — Core parsing implementation with support for both JavaScript and TypeScript AST generation
napi/parser/src/lib.rs - parseSync (function) — Synchronous parsing API with lazy loading of raw transfer and experimental features
napi/parser/src-js/index.js - Oxc (class) — Main playground class providing integrated parsing, linting, formatting, and minification
napi/playground/src/lib.rs - transform_impl (function) — Core transformation function for TypeScript/JSX and modern JavaScript features
napi/transform/src/transformer.rs - Program (type-def) — Root AST node type definition representing a complete JavaScript/TypeScript program
npm/oxc-types/types.d.ts - _typeof (utility) — Babel-compatible typeof helper for handling Symbol types in transformed code
npm/runtime/src/helpers/typeof.js - TestRunner (class) — Main test runner that executes Babel conformance tests against Oxc transformations
tasks/transform_conformance/src/lib.rs
Sub-Modules
JavaScript/TypeScript code formatter with CLI and API interfaces
JavaScript/TypeScript linter with ESLint compatibility and conformance testing
Node.js bindings for JavaScript/TypeScript parsing with raw transfer optimization
All-in-one Node.js binding combining parsing, linting, formatting, and minification
Babel transformation conformance testing framework
Browser compatibility data generation for ES features
Configuration
pnpm-workspace.yaml (yaml)
packages(array, unknown) — default: apps/*,napi/*,wasm/*,npm/*,tasks/e2e,tasks/transform_conformance,tasks/compat_datacatalog.@arethetypeswrong/core(string, unknown) — default: 0.18.2catalog.@napi-rs/cli(string, unknown) — default: 3.5.1catalog.@napi-rs/wasm-runtime(string, unknown) — default: 1.1.1catalog.@types/node(string, unknown) — default: 24.1.0catalog.cross-env(string, unknown) — default: ^10.1.0catalog.eslint(string, unknown) — default: 9.39.4catalog.json-schema-to-typescript(string, unknown) — default: ^15.0.4- +6 more parameters
vite-task.json (json)
tasks.ready.command(string, unknown) — default: echo 'ready'tasks.ready.dependsOn(array, unknown) — default: vp:fmt,vp:lint,vp:testtasks.ready.cacheable(boolean, unknown) — default: truetasks.vp:fmt.command(string, unknown) — default: pnpm run fmttasks.vp:fmt.cacheable(boolean, unknown) — default: truetasks.vp:lint.dependsOn(array, unknown) — default: vp:build-oxlinttasks.vp:lint.command(string, unknown) — default: pnpm run linttasks.vp:lint.cacheable(boolean, unknown) — default: true- +7 more parameters
Explore the interactive analysis
See the full architecture map, data flow, and code patterns visualization.
Analyze on CodeSeaRelated Dev Tool Repositories
Frequently Asked Questions
What is oxc used for?
Collection of high-performance JavaScript/TypeScript tools written in Rust oxc-project/oxc is a 10-component dev tool written in Rust. Minimal connections — components operate mostly in isolation. The codebase contains 5176 files.
How is oxc architected?
oxc is organized into 5 architecture layers: CLI Applications, Core Rust Crates, NAPI Bindings, NPM Packages, and 1 more. Minimal connections — components operate mostly in isolation. This layered structure keeps concerns separated and modules independent.
How does data flow through oxc?
Data moves through 5 stages: Source Input → Parsing → Semantic Analysis → Processing → Code Generation. Data flows from source code through parsing, semantic analysis, transformation/linting/formatting, and code generation stages. This pipeline design reflects a complex multi-stage processing system.
What technologies does oxc use?
The core stack includes Rust (Core implementation language), NAPI-RS (Node.js native addon framework), TypeScript (Type definitions and tooling), pnpm (Package manager and workspace tool), mimalloc (High-performance memory allocator), tokio (Async runtime for Rust), and 2 more. A focused set of dependencies that keeps the build manageable.
What system dynamics does oxc have?
oxc exhibits 2 data pools (AST Cache, Test Results Store), 2 feedback loops, 3 control points, 2 delays. The feedback loops handle convergence and convergence. These runtime behaviors shape how the system responds to load, failures, and configuration changes.
What design patterns does oxc use?
4 design patterns detected: NAPI Dual Entry Points, Lazy Loading, Conformance Testing, Memory-Optimized Allocator.
Analyzed on March 31, 2026 by CodeSea. Written by Karolina Sarna.