How oxc-project/oxc works
Oxc is a Rust toolkit for JavaScript and TypeScript, with standalone linting and formatting applications plus compiler components for building tooling. The principal developer workflow is to provide source code to a tool and receive lint diagnostics or formatted output; the README also documents parser, transformer, and minifier capabilities for downstream toolchains. The graph preserves these distinct product areas and includes the AST as an internal layer. Internal call relationships are limited because the excerpts do not show the main runtime wiring; dashed edges mark documented capabilities without verified internal calls.
Main entry points: src/main.rs Oxlint CLI · run.rs Lint runner · src/main.rs Oxfmt CLI · format_api.rs Format API
Components 16
Developer tools
- Oxlint CLI
apps/oxlint/src/main.rs - Lint runner
apps/oxlint/src/run.rs - Lint config
apps/oxlint/src/config_loader.rs - Lint reporters
apps/oxlint/src/output_formatter/mod.rs - Oxfmt CLI
apps/oxfmt/src/main.rs - Format API
apps/oxfmt/src/api/format_api.rs
Compiler components
- Formatter engine
crates/oxc_formatter/src/lib.rs - JavaScript parser
crates/oxc_parser/src/lib.rs - Transformer
crates/oxc_transformer/src/lib.rs - Minifier
crates/oxc_minifier/src/lib.rs - Module resolver
Editor integration
- Language server
crates/oxc_language_server/src/worker_manager.rs
Shared foundations
- Syntax AST
crates/oxc_ast/src/ast/mod.rs - Target compatibility
crates/oxc_compat/src/engine_targets.rs - Diagnostics
crates/oxc_diagnostics/src/lib.rs
Other components
- Developer
Connections 12
- Developer → Oxlint CLI: runs lint
README.md - Oxlint CLI → Lint runner: runs
- Oxlint CLI → Lint config: loads config
- Lint runner → Lint reporters: reports findings
- Developer → Oxfmt CLI: formats code
README.md - Oxfmt CLI → Format API: invokes
- Format API → Formatter engine: formats source
- Developer → JavaScript parser: parses source
README.md - Developer → Transformer: transforms source
README.md - Developer → Minifier: minifies source
README.md - Developer → Module resolver: resolves modules
README.md - Developer → Language server: uses editor tooling