
Analysis of the Oxc Project: A Rust rewrite of JavaScript toolchains, with Oxlint now integrated into Preact, Shopify, ByteDance, and Shopee.
The Oxidation Compiler (Oxc) has rebuilt the core of the front-end toolchain using Rust: parsing, linting, formatting, transformation, compression, and module resolution all share a common Abstract Syntax Tree (AST). This article introduces Oxc's positioning, its six components, usage instructions, and its place within the ecosystem, drawing on the README and official documentation.
Related tags
Project Overview
Oxc (pronounced /ˈoʊɛks siː/, short for The Oxidation Compiler) is a set of high-performance JavaScript / TypeScript tools written in Rust. The repository <strong>oxc-project/oxc</strong> currently has approximately 23,120 stars and 1,383 forks, and uses the MIT license. The name is a play on words: “oxidation” is the chemical process of generating rust.
It’s not a single tool, but rather a collection of components that reimplement the most time-consuming parts of the frontend tooling chain – parsing, linting, formatting, transpilation, compression, and module resolution – all using a shared AST (Abstract Syntax Tree) and infrastructure. The README describes it simply as “a collection of high-performance tools for JavaScript and TypeScript written in Rust.” However, this statement reflects VoidZero’s vision of a “unified high-performance tooling chain” for JavaScript, with Oxc serving as the foundation. It supports Vite’s Rollup bundler and provides the necessary infrastructure for future tools to “seamlessly collaborate.”
What Problems Does It Solve?
Frontend toolchains have long been plagued by two main issues: speed and fragmentation.
The speed problem stems from the languages themselves. Tools like ESLint, Prettier, and Babel run on Node.js, using single threads and processing files one at a time. This can lead to several minutes of CI (Continuous Integration) time for linting or formatting large projects with thousands of files. Local saving and checking is also often impractical. The fragmentation problem arises from the fact that each tool has its own parser. To lint, format, or transpile a single file, it needs to be parsed three times, using different AST shapes, making it difficult to reuse plugins across tools.
Oxc addresses these issues by prioritizing performance: It uses Rust to create a fast parser that generates a standardized AST, and then builds all other components – linting, formatting, transpilation, compression, and module resolution – on top of this AST. This achieves near-compiler speeds while ensuring seamless interoperability between tools – the same code is seen as the same tree by both a linter and a transformer.
The README provides examples of how Oxc is being used: Rolldown and Nuxt use Oxc for parsing; Rolldown also uses its transpilation and compression features; Nova, swc-node, and knip use oxc_resolver for module resolution; and Preact, Shopify, ByteDance, and Shopee use oxlint for linting in production.
Six Components, One Diagram
Oxc’s capabilities are divided into six independent components, each with a specific function:
| Component | Function | Official Performance Claims |
|---|---|---|
| Oxlint | ESLint-compatible linter | 50-100x faster than ESLint, supports over 800 rules |
| Oxfmt (Beta) | Prettier-compatible formatter | 30x faster than Prettier, 3x faster than Biome |
| oxc-parser | Parses .js(x) / .ts(x) files | 3x faster than SWC |
| oxc-transform | TS/JSX transpilation, syntax downleveling | ES2015 downleveling, Isolated Declarations support |
| oxc-minify (Alpha) | Production build compression | Dead code elimination, syntax shortening, variable renaming |
| oxc-resolver | CJS/ESM module resolution | 28x faster than enhanced-resolve |
The parser’s performance is particularly noteworthy: on a MacBook Pro M3 Max, Oxc achieved 26.3ms for parsing <code class="language-typescript">typescript.js</code>, while SWC and Biome took 84.1ms and 130.1ms respectively. The oxc-parser also passed all stage 4 tests in Test
More News
Want to see more quality content?
Browse all news