# oxc-project/oxc — codebase unpack

> Canonical page: https://codevetter.com/unpack/oxc

This is a deterministic Repo Unpack scan of oxc-project/oxc — a structural map, not a review, security audit, or maintainer-endorsed description.

- Scanned commit: 7f65b757df7c3225320d8f7e051e64873f80f988 (2026-10-02)
- Last upstream commit: fix(formatter): format assignment target property as assignment-like (#27289)
- Generated by codevetter 1.15.0 on 2026-10-02
- 4000 files scanned · 12.6 MB

Source inspection; upstream code and tests were not executed.

## Languages

- JavaScript: 4150 files
- Rust: 2463 files
- TypeScript: 2042 files
- JSON: 980 files
- Markdown: 620 files
- YAML: 83 files
- TOML: 81 files
- Sass: 57 files

## Repository structure

- crates/ — 1925 files
- apps/ — 1470 files
- tasks/ — 380 files
- napi/ — 102 files
- .github/ — 54 files
- npm/ — 23 files
- packages/ — 7 files
- .agents/ — 4 files

Probable source entrypoint: `Cargo.toml` (inferred from the tree, not upstream docs)

## Package

- Cargo.toml: null — 0 declared dependencies

## Structural health signals

Average score 6.2/10 across 96 files; 55 hotspots. These are deterministic review leads, not proof of a bug.

## Recent history

- 7f65b757df7c (2026-10-02) fix(formatter): format assignment target property as assignment-like (#27289)
- 6c08f2aaf108 (2026-10-02) fix(formatter_css): apply the `url()` import exception to a lone comma group (#27288)
- 565d75dce1ca (2026-10-02) fix(minifier): correct indopedency when processing nested sequences (#27273)
- f9a056b8a455 (2026-10-02) test(oxlint): use plain text for stylish CLI snapshots (#27287)
- 3f86ed558ad9 (2026-10-02) test(lexer): improve test for `kw_verify_batch` (#27286)

## Overview

Oxc is a modular Rust toolchain for JavaScript and TypeScript, serving developers through Oxlint and Oxfmt and tooling authors through compiler crates and Node.js bindings. Its implementations share arena-backed ASTs, semantic analysis, diagnostics, and code generation, while application layers add file discovery, configuration, parallel processing, and editor integration. This brief examines commit 7f65b757df7c3225320d8f7e051e64873f80f988 through bounded source inspection; it does not establish runtime correctness or measured performance.

## System map

The repository combines reusable compiler components with native applications and Node.js bindings. Runtime boundaries differ between Rust-only CLIs, NAPI callbacks, the stdio language server, and the optional tsgolint subprocess. Application persistence is visible as source-file rewrites and a JSON suppression baseline. Build and verification definitions span Cargo, pnpm, Just, and GitHub Actions.
- Cargo groups apps, crates, napi, and tasks into one workspace using resolver 3 and Rust edition 2024; the declared MSRV is 1.97.0. — [Cargo.toml#L1-18](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/Cargo.toml#L1-L18)
- The shared dependency table connects allocator, AST, parser, semantic, transformer, minifier, codegen, diagnostics, and traversal crates; formatter and application crates are separately marked unpublished. — [Cargo.toml#L122-178](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/Cargo.toml#L122-L178)
- Oxlint's native entrypoint uses a synchronous Rayon CLI path and constructs a Tokio runtime only when --lsp is selected. — [apps/oxlint/src/main.rs#L8-42](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/main.rs#L8-L42)
- Oxfmt exports both a Rust executable and lib/cdylib artifacts; its Rust main supports basic CLI processing, while run_cli supplies Node-backed LSP, stdin, initialization, and migration dispatch. — [apps/oxfmt/Cargo.toml#L18-27](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/Cargo.toml#L18-L27) [apps/oxfmt/src/main.rs#L1-15](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/main.rs#L1-L15) [apps/oxfmt/src/main_napi.rs#L69-120](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/main_napi.rs#L69-L120)
- The language-server transport is stdin/stdout through tower_lsp_server; its service registers document lifecycle, diagnostics, formatting, code actions, and workspace commands. — [crates/oxc_language_server/src/lib.rs#L52-68](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_language_server/src/lib.rs#L52-L68) [crates/oxc_language_server/src/lib.rs#L82-108](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_language_server/src/lib.rs#L82-L108)
- LintRunner owns regular LintService, optional TsGoLintState, and a shared disable-directive store; tsgolint is launched as a separate process with piped JSON input. — [crates/oxc_linter/src/lint_runner.rs#L17-39](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/lint_runner.rs#L17-L39) [crates/oxc_linter/src/tsgolint.rs#L360-412](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/tsgolint.rs#L360-L412)
- Persistent outputs include formatter source rewrites, lint-fix source rewrites, and pretty-printed JSON suppression tracking saved through fs::write. — [apps/oxfmt/src/cli/service.rs#L80-98](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/service.rs#L80-L98) [crates/oxc_linter/src/service/runtime.rs#L727-740](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L727-L740) [crates/oxc_linter/src/suppression/tracking.rs#L113-122](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/suppression/tracking.rs#L113-L122)
- Root pnpm scripts build and test selected application, NAPI, and package workspaces sequentially; Cargo aliases provide checks, Clippy, conformance, benchmarking, and code generation, while just test invokes cargo test --all-features. — [package.json#L4-20](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/package.json#L4-L20) [.cargo/config.toml#L1-13](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.cargo/config.toml#L1-L13) [justfile#L49-55](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/justfile#L49-L55)

## Feature catalog

The inspected public surfaces cover linting, formatting, parsing, transformation, minification, and editor integration. Application features depend on the execution boundary: Node callbacks enable capabilities unavailable in the Rust-only formatter CLI. Framework and ecosystem names generally describe supported inputs or lint plugins, rather than a product frontend. This catalog covers the investigated interfaces and does not claim exhaustive enumeration of every rule or option.
- Oxlint exposes initialization, resolved-config printing, rule listing, and debug file listing as early branches within CliRunner::run. — [apps/oxlint/src/lint.rs#L99-101](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L99-L101) [apps/oxlint/src/lint.rs#L347-366](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L347-L366) [apps/oxlint/src/lint.rs#L377-387](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L377-L387)
- Type-aware linting and type checking are configurable; --type-check requires type-aware mode, and --type-check-only rejects fix flags and suppression-update flags. — [apps/oxlint/src/lint.rs#L410-438](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L410-L438)
- Oxlint supports bulk suppression and pruning through oxlint-suppressions.json, reports stale baseline entries, and returns success after a successful --suppress-all update. — [apps/oxlint/src/lint.rs#L403-408](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L403-L408) [apps/oxlint/src/lint.rs#L562-584](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L562-L584) [apps/oxlint/src/lint.rs#L602-609](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L602-L609)
- Oxfmt's Node CLI dispatches initialization, Prettier migration, Biome migration, stdin formatting, filesystem formatting, and LSP operation. — [apps/oxfmt/src/main_napi.rs#L69-120](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/main_napi.rs#L69-L120) [apps/oxfmt/src-js/cli.ts#L51-62](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src-js/cli.ts#L51-L62)
- Oxfmt classifies JS/TS, TOML, package.json, JSON/JSONC/JSON5, GraphQL, CSS variants, and YAML into native strategies; Prettier file delegation is gated by the napi feature. — [apps/oxfmt/src/core/support.rs#L15-91](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/support.rs#L15-L91) [apps/oxfmt/src/core/format.rs#L39-119](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/format.rs#L39-L119)
- Embedded formatting routes GraphQL, CSS/SCSS/Less, YAML, and JSON variants natively; HTML, Angular, and Markdown use an available Prettier fallback, and unsupported languages remain unchanged. — [apps/oxfmt/src/core/embed/dispatcher.rs#L1-5](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/embed/dispatcher.rs#L1-L5) [apps/oxfmt/src/core/embed/dispatcher.rs#L76-105](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/embed/dispatcher.rs#L76-L105)
- The parser binding offers synchronous and task-based parsing, optional semantic diagnostics, selectable JavaScript/TypeScript AST fields, comments, and module metadata. — [napi/parser/src/lib.rs#L65-77](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L65-L77) [napi/parser/src/lib.rs#L102-147](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L102-L147) [napi/parser/src/lib.rs#L158-187](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L158-L187)
- Transformation options include TypeScript declarations, decorators, third-party plugin options, JSX, target environments, inject/define replacements, and source maps; minification separately returns code, maps, legal comments, diagnostics, and an optional property-mangle cache. — [napi/transform/src/transformer.rs#L82-169](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/transform/src/transformer.rs#L82-L169) [napi/transform/src/transformer.rs#L929-937](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/transform/src/transformer.rs#L929-L937) [napi/minify/src/lib.rs#L34-46](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/minify/src/lib.rs#L34-L46)

## Data flow

Source text enters through filesystem reads or explicit binding arguments and becomes arena-owned compiler data. Configuration resolution selects rule state or a typed formatting strategy before processing. Node parser output crosses an additional coordinate and serialization boundary. Filesystem outputs and suppression baselines are distinct from temporary allocator, module-graph, and directive state.
- Parser binding input consists of filename, source text, and ParserOptions; parse_with_return creates an allocator, derives SourceType and AST flavor, then calls parse_impl. — [napi/parser/src/lib.rs#L79-108](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L79-L108) [napi/parser/src/lib.rs#L160-166](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L160-L166)
- Node parser results optionally accumulate semantic diagnostics, convert AST/module/error offsets from UTF-8 to UTF-16, serialize ESTree fields, and return comments plus module metadata. — [napi/parser/src/lib.rs#L110-147](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L110-L147)
- Oxlint normalizes explicit paths, filters ignore sources, walks candidates, loads root/nested configuration, and combines resolved rule state and external-plugin metadata into ConfigStore. — [apps/oxlint/src/lint.rs#L123-198](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L123-L198) [apps/oxlint/src/lint.rs#L220-238](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L220-L238) [apps/oxlint/src/lint.rs#L254-266](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L254-L266) [apps/oxlint/src/lint.rs#L369-413](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L369-L413)
- Lint Runtime stores source and section semantics under an AllocatorGuard-backed self_cell; a concurrent module graph retains Arc-owned records, with other cyclic references required to use Weak. — [crates/oxc_linter/src/service/runtime.rs#L45-68](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L45-L68) [crates/oxc_linter/src/service/runtime.rs#L79-119](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L79-L119)
- PartialLoader separates framework source sections; each section is parsed and semantically analyzed, and failed-section diagnostic spans are shifted back to original file coordinates. — [crates/oxc_linter/src/service/runtime.rs#L1078-1124](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L1078-L1124) [crates/oxc_linter/src/service/runtime.rs#L1137-1164](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L1137-L1164)
- Oxfmt streams FormatStrategy entries over an mpsc channel; FormatService bridges them into Rayon processing, reads source, formats it, and sends success or wrapped diagnostics over separate channels. — [apps/oxfmt/src/cli/walk_runner.rs#L124-150](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/walk_runner.rs#L124-L150) [apps/oxfmt/src/cli/service.rs#L36-78](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/service.rs#L36-L78) [apps/oxfmt/src/cli/service.rs#L100-117](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/service.rs#L100-L117)
- JS formatting acquires a pooled allocator and a FormatSession carrying resolved host services, calls format_with_session, and prints its result; embedded children inherit the host's resolved config rather than resolving a virtual path. — [apps/oxfmt/src/core/format.rs#L410-450](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/format.rs#L410-L450) [apps/oxfmt/src/core/embed/dispatcher.rs#L108-127](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/embed/dispatcher.rs#L108-L127)
- Suppression state maps filenames to rule diagnostic counts; serialization sorts filenames and rules, while finalization compares runtime counts with the baseline before saving updates or reporting differences. — [crates/oxc_linter/src/suppression/tracking.rs#L32-58](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/suppression/tracking.rs#L32-L58) [crates/oxc_linter/src/suppression/tracking.rs#L113-122](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/suppression/tracking.rs#L113-L122) [crates/oxc_linter/src/suppression/mod.rs#L142-179](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/suppression/mod.rs#L142-L179)

## Behavior traces

The following traces were reconstructed by reading callers and callees, without execution. They follow parser API use, lint startup and fixes, suppression persistence, formatter startup and writes, and minification. Branch conditions matter: parser recovery differs from lint rejection, configuration can fail during streaming, and type-check-only alters the lint pipeline.
- Parser flow: parse_sync → parse_with_return → get_source_type/get_ast_type → parse_impl → Parser::new.with_options.parse; showSemanticErrors then conditionally invokes SemanticBuilder before UTF-16 conversion and ESTree serialization. — [napi/parser/src/lib.rs#L79-122](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L79-L122) [napi/parser/src/lib.rs#L142-166](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L142-L166)
- Lint startup: main → lint_command().run → init_tracing → handle_threads → CliRunner::new.run; --lsp instead constructs Tokio and awaits run_lsp. — [apps/oxlint/src/main.rs#L8-42](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/main.rs#L8-L42)
- Lint orchestration: CliRunner::run → Walk::paths → ConfigLoader::load_root_and_nested → ConfigStoreBuilder::build → LintRunner::builder.build → lint_files; regular LintService runs before optional tsgolint, while type-check-only collects parse diagnostics instead of regular rules. — [apps/oxlint/src/lint.rs#L220-238](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L220-L238) [apps/oxlint/src/lint.rs#L254-266](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L254-L266) [apps/oxlint/src/lint.rs#L351-366](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L351-L366) [crates/oxc_linter/src/lint_runner.rs#L264-293](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/lint_runner.rs#L264-L293)
- Per-file lint/fix flow: Runtime::run_impl resolves modules → process_path_to_module reads source → process_source splits sections → process_source_section parses and builds semantics → run_with_disable_directives → optional Fixer::fix → write_file for modified source. — [crates/oxc_linter/src/service/runtime.rs#L605-628](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L605-L628) [crates/oxc_linter/src/service/runtime.rs#L674-699](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L674-L699) [crates/oxc_linter/src/service/runtime.rs#L727-740](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L727-L740) [crates/oxc_linter/src/service/runtime.rs#L980-1025](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L980-L1025)
- Suppression persistence: CliRunner loads SuppressionManager → build_diff → lint_files accumulates counts → finalize computes suppression/pruning updates → write → SuppressionTracking::save serializes and writes JSON; type-check-only skips finalization. — [apps/oxlint/src/lint.rs#L403-408](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L403-L408) [apps/oxlint/src/lint.rs#L538-568](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxlint/src/lint.rs#L538-L568) [crates/oxc_linter/src/suppression/mod.rs#L142-167](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/suppression/mod.rs#L142-L167) [crates/oxc_linter/src/suppression/tracking.rs#L113-122](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/suppression/tracking.rs#L113-L122)
- Node formatter startup: cli.ts gathers argv and supplies callbacks → run_cli parses modes → initialization/migration returns to JavaScript; CLI mode initializes Rayon, constructs WalkRunner with external services and a config loader, then calls run. — [apps/oxfmt/src-js/cli.ts#L39-62](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src-js/cli.ts#L39-L62) [apps/oxfmt/src/main_napi.rs#L55-94](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/main_napi.rs#L55-L94) [apps/oxfmt/src/main_napi.rs#L110-120](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/main_napi.rs#L110-L120)
- Formatter write flow: WalkRunner::run loads ConfigScopes → starts FormatService::run_streaming → ScopedWalker::run sends targets → SourceFormatter::format dispatches a strategy → format_with_session.print for JS → fs::write only when Write mode and is_changed are both true. — [apps/oxfmt/src/cli/walk_runner.rs#L85-98](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/walk_runner.rs#L85-L98) [apps/oxfmt/src/cli/walk_runner.rs#L137-174](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/walk_runner.rs#L137-L174) [apps/oxfmt/src/cli/service.rs#L66-98](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/service.rs#L66-L98) [apps/oxfmt/src/core/format.rs#L419-450](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/format.rs#L419-L450)
- Minification flow: minify_sync → minify_impl validates options → Parser::parse → disables property mangling if parsing reported diagnostics → Minifier::minify → Codegen with returned scoping/private mappings → result containing code, map, comments, errors, and eligible cache. — [napi/minify/src/lib.rs#L61-101](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/minify/src/lib.rs#L61-L101) [napi/minify/src/lib.rs#L122-151](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/minify/src/lib.rs#L122-L151)

## Testing signals

Tests and CI were inspected, not executed; test existence is not a passing result. Rust tests, Insta snapshots, Vitest bindings tests, formatter fixture harnesses, and external conformance tasks cover different boundaries. The inspected definitions expose important limits, including recorded idempotency failures and platform jobs that run only on main. This bounded inspection does not establish complete coverage or identify every untested path.
- The inspected NoDebugger rule uses a Rust #[test], Tester pass/fail inputs, explicit expected fixes, and test_and_snapshot; cases preserve valid control-flow bodies by replacing debugger with an empty block. — [crates/oxc_linter/src/rules/eslint/no_debugger.rs#L53-100](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/rules/eslint/no_debugger.rs#L53-L100)
- Parser Vitest cases exercise language selection, async output/comments, opt-in semantic errors, script/module/commonjs interpretation, and declaration-file parsing; these definitions were read without running them. — [napi/parser/test/parse.test.ts#L1-90](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/test/parse.test.ts#L1-L90)
- Minifier Vitest cases assert emitted code and source-map contents and test disabling compression, mangling, and whitespace removal. — [napi/minify/test/minify.test.ts#L1-28](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/minify/test/minify.test.ts#L1-L28)
- The shared formatter harness generates option/width variants, asserts input/output fingerprints, and feeds Insta snapshots; idempotency mismatches are recorded as snapshot sections rather than asserted independently. — [crates/oxc_formatter_tests/src/lib.rs#L1-20](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_formatter_tests/src/lib.rs#L1-L20) [crates/oxc_formatter_tests/src/harness.rs#L1-13](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_formatter_tests/src/harness.rs#L1-L13) [crates/oxc_formatter_tests/src/harness.rs#L230-254](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_formatter_tests/src/harness.rs#L230-L254)
- SourceFormatter Rust tests cover native CSS-in-JS, native JSDoc fences, embedded formatting disabled, and preservation of non-native HTML embeds when napi is disabled. — [apps/oxfmt/src/core/format.rs#L707-744](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/format.rs#L707-L744)
- The conformance CLI selects parser, lexer, semantic, codegen, formatter, transformer, minifier, runtime, ESTree, token, and types tasks; it loads fixture data lazily and supports --filter. — [tasks/coverage/src/main.rs#L8-17](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/tasks/coverage/src/main.rs#L8-L17) [tasks/coverage/src/main.rs#L34-55](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/tasks/coverage/src/main.rs#L34-L55) [.cargo/config.toml#L7-7](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.cargo/config.toml#L7-L7)
- CI defines Linux all-feature tests, conditionally built NAPI/Vitest and e2e suites, and app-specific tests; ARM64, macOS, Windows, big-endian, and 32-bit jobs are main-only, with explicit cross-target exclusions. — [.github/workflows/ci.yml#L22-57](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/ci.yml#L22-L57) [.github/workflows/ci.yml#L75-78](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/ci.yml#L75-L78) [.github/workflows/ci.yml#L126-160](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/ci.yml#L126-L160) [.github/workflows/ci.yml#L230-241](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/ci.yml#L230-L241)
- Separate inspected workflows define strict-provenance Miri checks, Windows allocator Miri, LLVM coverage, CodSpeed component benchmarks, and label-triggered ecosystem CI; their presence supplies no execution or performance result in this investigation. — [.github/workflows/miri.yml#L66-73](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/miri.yml#L66-L73) [.github/workflows/miri-windows.yml#L68-75](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/miri-windows.yml#L68-L75) [.github/workflows/benchmark.yml#L83-104](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/benchmark.yml#L83-L104) [.github/workflows/ecosystem-ci.yml#L15-20](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/ecosystem-ci.yml#L15-L20)

## Risk map

These are source-observed trust boundaries and correctness hazards, not confirmed vulnerabilities. The most consequential inspected paths execute JavaScript configuration, select an external executable, transfer raw memory, or rewrite user files. Compiler-stage ordering and streaming configuration introduce additional coupling. Testing and documentation limits should be accounted for before making broader safety or correctness claims.
- JavaScript/TypeScript configuration is executable input: importJsConfig dynamically imports a cache-busted file URL before validating its default export; Oxfmt invokes it through the Node config callback. — [apps/shared/src-js/js_config/index.ts#L18-38](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/shared/src-js/js_config/index.ts#L18-L38) [apps/oxfmt/src-js/cli/js_config.ts#L10-11](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src-js/cli/js_config.ts#L10-L11) [apps/oxfmt/src-js/cli.ts#L41-48](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src-js/cli.ts#L41-L48)
- Type-aware linting trusts executable selection from OXLINT_TSGOLINT_PATH, ancestor node_modules/.bin locations, then PATH; spawn_tsgolint executes that path with headless and piped input. — [crates/oxc_linter/src/tsgolint.rs#L1350-1368](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/tsgolint.rs#L1350-L1368) [crates/oxc_linter/src/tsgolint.rs#L1380-1407](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/tsgolint.rs#L1380-L1407) [crates/oxc_linter/src/tsgolint.rs#L360-365](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/tsgolint.rs#L360-L365)
- Raw parser transfer exposes unsafe functions with caller requirements for source offset, length, and valid UTF-8; get_buffer_offset explicitly does not verify bounds, and the representation relies on large aligned buffers and platform gating. — [napi/parser/src/raw_transfer.rs#L29-62](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/raw_transfer.rs#L29-L62) [napi/parser/src/raw_transfer.rs#L65-103](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/raw_transfer.rs#L65-L103) [napi/parser/src/lib.rs#L33-46](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/napi/parser/src/lib.rs#L33-L46)
- Formatter writes can partially complete before a lazy nested-config failure: WalkRunner explicitly warns that unaffected scopes may already have been written. — [apps/oxfmt/src/cli/walk_runner.rs#L175-188](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/walk_runner.rs#L175-L188) [apps/oxfmt/src/cli/service.rs#L80-98](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/service.rs#L80-L98)
- Selected formatting paths are rewritten with fs::write, and cwd is used to shorten displayed paths with an outside-cwd fallback; this write site itself does not enforce repository-root containment. — [apps/oxfmt/src/cli/service.rs#L80-109](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/cli/service.rs#L80-L109)
- Transformations can leave scoping out of sync with the AST; CompilerInterface::compile tracks scoping_dirty and rebuilds before inject/define consumers, making stage order a correctness-sensitive edit boundary. — [crates/oxc/src/compiler.rs#L180-208](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc/src/compiler.rs#L180-L208)
- Formatter fixture snapshots can contain accepted idempotency mismatches, so a matching snapshot alone does not establish formatter idempotence. — [crates/oxc_formatter_tests/src/harness.rs#L3-11](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_formatter_tests/src/harness.rs#L3-L11)
- Architecture documentation contains version drift: ARCHITECTURE.md states MSRV 1.86.0+, whereas Cargo.toml declares 1.97.0 and rust-toolchain.toml selects 1.99.0. — [ARCHITECTURE.md#L382-388](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/ARCHITECTURE.md#L382-L388) [Cargo.toml#L15-18](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/Cargo.toml#L15-L18) [rust-toolchain.toml#L1-3](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/rust-toolchain.toml#L1-L3)

## Extension points

Extensions attach to explicit Rust traits, generated registries, callback interfaces, and dispatch tables. Native lint rules and JavaScript lint plugins enter through different mechanisms. Formatter integration owns language routing and host services, while language crates implement formatting. Compiler hooks and filesystem abstractions provide composition points without requiring changes to application startup.
- Native lint rules implement Rule hooks for configuration, AST nodes, whole-file analysis, Jest/Vitest nodes, and per-file should_run selection. — [crates/oxc_linter/src/rule.rs#L19-75](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/rule.rs#L19-L75)
- Rule metadata is declared with declare_oxc_lint, as demonstrated by NoDebugger; the generated rule enum identifies cargo lintgen as its regeneration command. — [crates/oxc_linter/src/rules/eslint/no_debugger.rs#L45-51](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/rules/eslint/no_debugger.rs#L45-L51) [crates/oxc_linter/src/generated/rules_enum.rs#L1-13](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/generated/rules_enum.rs#L1-L13)
- External lint plugins supply workspace create/destroy, plugin loading, rule configuration, and per-file lint callbacks carrying rule IDs, options IDs, settings, globals, and allocator access. — [crates/oxc_linter/src/external_linter.rs#L15-67](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/external_linter.rs#L15-L67) [crates/oxc_linter/src/lib.rs#L78-84](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/lib.rs#L78-L84)
- RuntimeFileSystem is an injection boundary for reading and writing linted files; LintService accepts it for filesystem linting, source linting, and parse-diagnostic collection. — [crates/oxc_linter/src/service/runtime.rs#L184-203](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/runtime.rs#L184-L203) [crates/oxc_linter/src/service/mod.rs#L74-106](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/service/mod.rs#L74-L106)
- Whole-file formatter support plugs into classify_file_kind and FormatStrategy::from_format_config; classification returns None for excluded or unsupported targets and gates Prettier strategies on napi. — [apps/oxfmt/src/core/support.rs#L15-91](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/support.rs#L15-L91) [apps/oxfmt/src/core/format.rs#L138-169](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/format.rs#L138-L169)
- Embedded language support plugs into route and dispatcher assembly; aliases resolve centrally, with typed Native, Prettier, and Unsupported outcomes. — [apps/oxfmt/src/core/embed/dispatcher.rs#L76-105](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/src/core/embed/dispatcher.rs#L76-L105)
- Language-server tools implement ToolBuilder::build and Tool methods for configuration, watchers, commands, code actions, formatting, and diagnostic lifecycle behavior. — [crates/oxc_language_server/src/tool.rs#L11-58](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_language_server/src/tool.rs#L11-L58) [crates/oxc_language_server/src/tool.rs#L60-106](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_language_server/src/tool.rs#L60-L106) [crates/oxc_language_server/src/tool.rs#L110-138](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_language_server/src/tool.rs#L110-L138)
- CompilerInterface exposes stage options and after_parse/after_semantic/after_transform hooks with early termination; formatter test consumers separately implement FixtureFormatter with language-owned options and fingerprints. — [crates/oxc/src/compiler.rs#L54-125](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc/src/compiler.rs#L54-L125) [crates/oxc_formatter_tests/src/harness.rs#L85-94](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_formatter_tests/src/harness.rs#L85-L94)

## Contributor handoff

Use the pinned implementation and nearest package guidance to choose a narrow edit boundary. Tests and CI were inspected, not executed, and the inventory remains bounded rather than exhaustive. Future verification should target the changed runtime surface before broad workspace checks. Generated outputs, formatter policy, and Rust-versus-Node feature differences are recurring traps.
- Start with the root and nearest package AGENTS.md; Oxfmt's guide identifies separate CLI, stdin, LSP, direct API, and textToDoc paths and warns against assuming shared behavior. — [AGENTS.md#L19-47](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/AGENTS.md#L19-L47) [apps/oxfmt/AGENTS.md#L9-32](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/AGENTS.md#L9-L32)
- Use manifests for version decisions: development Rust is 1.99.0, MSRV is 1.97.0, and the root package manager is pnpm 12.7.0. — [rust-toolchain.toml#L1-3](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/rust-toolchain.toml#L1-L3) [Cargo.toml#L15-18](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/Cargo.toml#L15-L18) [package.json#L20-20](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/package.json#L20-L20)
- Edit generator inputs rather than generated artifacts: AST builder output names its generator, and linter registry output requires cargo lintgen; root guidance also requires lint-timings for linter codegen changes. — [crates/oxc_ast/src/generated/ast_builder.rs#L1-12](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_ast/src/generated/ast_builder.rs#L1-L12) [crates/oxc_linter/src/generated/rules_enum.rs#L1-2](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_linter/src/generated/rules_enum.rs#L1-L2) [AGENTS.md#L68-74](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/AGENTS.md#L68-L74)
- For formatter changes, read the shared FORMATTER_POLICY through the crate guide, preserve text-in API boundaries, and keep comments, parentheses, and embedding responsibilities in their owning layer. — [crates/oxc_formatter/AGENTS.md#L1-28](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_formatter/AGENTS.md#L1-L28) [crates/oxc_formatter/AGENTS.md#L59-82](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/crates/oxc_formatter/AGENTS.md#L59-L82)
- Account for Oxfmt execution differences: the pure Rust CLI has no stdin/LSP support, the Node API uses caller-supplied options without config discovery, and native formatters do not fall back to Prettier. — [apps/oxfmt/AGENTS.md#L14-22](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/AGENTS.md#L14-L22) [apps/oxfmt/AGENTS.md#L68-75](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/apps/oxfmt/AGENTS.md#L68-L75)
- For later authorized checks, use focused Rust tests, filtered cargo coverage tasks, or package-specific pnpm build-test/test commands; this investigation inspected their definitions and CI wiring without executing them. — [justfile#L53-55](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/justfile#L53-L55) [justfile#L117-119](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/justfile#L117-L119) [.github/workflows/ci.yml#L230-241](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/ci.yml#L230-L241) [.github/workflows/ci.yml#L324-328](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/.github/workflows/ci.yml#L324-L328)
- Do not treat just fmt or just ready as harmless read-only checks: fmt invokes cargo shear --fix, while ready installs dependencies, regenerates code, formats files, and runs broad checks. — [justfile#L35-47](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/justfile#L35-L47) [justfile#L66-70](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/justfile#L66-L70)
- Submission guidance requires AI-use disclosure and human responsibility for reviewed, understood, tested contributions; preserve this requirement when preparing an issue or PR. — [CONTRIBUTING.md#L12-21](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/CONTRIBUTING.md#L12-L21) [AGENTS.md#L9-15](https://github.com/oxc-project/oxc/blob/7f65b757df7c3225320d8f7e051e64873f80f988/AGENTS.md#L9-L15)

Source repository: https://github.com/oxc-project/oxc
Full evidence corpus: https://github.com/Codevetter/codevetter/tree/main/benchmarks/repo-unpacks/oxc.json

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
