DEV Community

Alex Spinov
Alex Spinov

Posted on

Oxc Has a Free Rust-Powered JS Toolchain — Linter, Parser, and Minifier in One

ESLint takes 30 seconds to lint your project. Oxc does it in under 1 second. Same rules, 50-100x faster.

What is Oxc?

Oxc (Oxidation Compiler) is a collection of JavaScript/TypeScript tools written in Rust. It includes a parser, linter, resolver, transformer, minifier, and formatter — all sharing the same fast AST.

Built by Boshen Chen, now part of the VoidZero ecosystem alongside Vite and Rolldown.

The Oxc Toolchain

1. Oxlint — 50-100x Faster Linting

npx oxlint@latest
Enter fullscreen mode Exit fullscreen mode

That's it. No config file needed. It runs over 400 rules by default and catches real bugs:

  × Unexpected constant condition
    ╭─[src/app.ts:15:7]
  15 │ if (true) {
     │     ^^^^
  16 │   doSomething();
    ╰────
  help: Remove this always-truthy condition
Enter fullscreen mode Exit fullscreen mode

Performance comparison (on a large React project):

Tool Time Rules
ESLint 32s 300
Oxlint 0.3s 400+

2. Oxc Parser — Fastest JS/TS Parser

import { parseSync } from 'oxc-parser';

const result = parseSync('test.tsx', 'const x: number = 42;');
console.log(result.program); // Full AST
console.log(result.errors);  // Parse errors with spans
Enter fullscreen mode Exit fullscreen mode

3x faster than SWC, 5x faster than Babel parser.

3. Oxc Resolver — Node.js Module Resolution

import { ResolverFactory } from 'oxc-resolver';

const resolver = new ResolverFactory({
  conditionNames: ['import', 'require'],
  extensions: ['.ts', '.tsx', '.js', '.jsx'],
  mainFields: ['module', 'main'],
});

const result = resolver.sync('.', 'react');
console.log(result.path); // /node_modules/react/index.js
Enter fullscreen mode Exit fullscreen mode

28x faster than enhanced-resolve (webpack's resolver).

4. Oxc Transformer — TypeScript/JSX Stripping

import { isolatedDeclaration } from 'oxc-transform';

const result = isolatedDeclaration('file.ts', sourceCode);
console.log(result.code);         // .d.ts output
console.log(result.sourceMap);    // Source map
Enter fullscreen mode Exit fullscreen mode

Generate .d.ts files without running the full TypeScript compiler.

5. Oxc Minifier

Currently in development, targeting Terser-compatible output with Rust speed. Early benchmarks show 3-5x faster than Terser with comparable output size.

Oxlint vs ESLint

Oxlint ESLint
Speed <1 second 30+ seconds
Config needed No Yes (.eslintrc)
Zero deps Yes (single binary) 100+ packages
TypeScript Built-in Requires plugin
Auto-fix Yes Yes
Plugin ecosystem Growing Massive

Strategy: Use Oxlint for speed on CI. Keep ESLint for custom/framework rules. They work together — Oxlint skips rules that ESLint already covers.

Integration

// package.json
{
  "scripts": {
    "lint": "oxlint && eslint .",
    "lint:ci": "oxlint --deny-warnings"
  }
}
Enter fullscreen mode Exit fullscreen mode

Run Oxlint first (catches 400+ rules in <1s), then ESLint for remaining framework-specific rules.

Getting Started

# Just run it
npx oxlint@latest

# Or install
npm install -D oxlint

# With specific categories
npx oxlint -D correctness -D perf -D suspicious
Enter fullscreen mode Exit fullscreen mode

The Bottom Line

Oxc is rebuilding the JavaScript toolchain from scratch in Rust. Start with Oxlint today — it's the easiest win: zero config, 50x faster, catches real bugs. The rest of the toolchain is coming fast.


Need data extraction or scraping tools? Check my Apify actors or email spinov001@gmail.com for custom solutions.

Top comments (0)