Skills2026年4月14日·1 分钟阅读

Oxc — The JavaScript Oxidation Compiler Written in Rust

Oxc is a Rust-based collection of JavaScript tools — parser, linter, resolver, transformer, and minifier — designed to be the fastest in each category. It underpins next-generation web tools like Rolldown and provides drop-in replacements for ESLint, Babel, and terser.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
step-1.md
直接安装命令
npx -y tokrepo@latest install dc46ca98-37be-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

TL;DR
Oxc provides Rust-powered JS/TS parser, linter, transformer, and minifier -- fastest in each category.
§01

What it is

Oxc (JavaScript Oxidation Compiler) is a Rust-based collection of JavaScript and TypeScript tools. It includes a parser, linter (oxlint), resolver, transformer, and minifier, each designed to be the fastest in its category. Oxc powers next-generation tools like Rolldown (the Vite bundler) and provides drop-in replacements for ESLint, Babel, and terser.

Oxc targets JavaScript and TypeScript developers who want faster tooling without changing their workflow. It also targets tool authors who need a fast, correct AST parser as a foundation.

§02

How it saves time or tokens

ESLint, Babel, and terser are JavaScript-based tools that parse and transform ASTs in a single-threaded runtime. Oxc reimplements these in Rust with parallel execution, achieving 10-100x speedups. Running oxlint on a large codebase takes seconds instead of minutes. This directly reduces CI time and developer feedback loops.

§03

How to use

  1. Install the linter: npm install -g oxlint.
  2. Run on your codebase: oxlint src for ESLint-compatible linting.
  3. Use Oxc as part of Rolldown or integrate the parser via the oxc npm packages for custom tooling.
§04

Example

# Install and run the linter
npm install -g oxlint
oxlint src

# Lint with specific rule categories
oxlint --deny-warnings src

# Use as a project dev dependency
npm install -D oxlint
npx oxlint src
// package.json script integration
{
  "scripts": {
    "lint": "oxlint src",
    "lint:fix": "oxlint --fix src"
  }
}
§05

Related on TokRepo

§06

Common pitfalls

  • Expecting full ESLint plugin compatibility. oxlint implements the most popular ESLint rules natively but does not support custom ESLint plugins written in JavaScript.
  • Running oxlint alongside ESLint without disabling overlapping rules. This produces duplicate warnings and slows down the lint step.
  • Assuming Oxc's transformer covers all Babel plugins. Oxc focuses on the most common transformations (JSX, TypeScript, decorators) but niche Babel plugins may not have equivalents yet.

常见问题

What is the relationship between Oxc and Rolldown?+

Rolldown uses Oxc as its parsing and transformation engine. When Rolldown parses JavaScript or TypeScript files, it uses Oxc's parser. When it minifies output, it uses Oxc's minifier. Oxc is the foundation layer; Rolldown is the bundler built on top.

Does oxlint replace ESLint?+

oxlint can replace ESLint for projects that use built-in ESLint rules and popular plugins (import, react, typescript-eslint). It does not support custom JavaScript-based ESLint plugins. Many teams run oxlint for speed and keep ESLint for custom rules.

How fast is Oxc compared to ESLint?+

Benchmarks show oxlint running 50-100x faster than ESLint on the same codebase. A project that takes ESLint 30 seconds to lint completes in under a second with oxlint. The speed comes from Rust's compiled performance and parallel file processing.

Can I use Oxc's parser in my own tools?+

Yes. Oxc provides npm packages (oxc-parser, oxc-transform) that expose the Rust-powered parser via NAPI bindings. You get a standards-compliant AST in JavaScript/TypeScript with parsing speeds that exceed all JS-based parsers.

Who maintains Oxc?+

Oxc is maintained by the Void(0) team (formerly oxc-project). It is open source under the MIT license. The project has active development with regular releases and growing adoption through Rolldown and the broader Vite ecosystem.

引用来源 (3)
  • Oxc GitHub— Oxc is a Rust-based JavaScript toolchain with parser, linter, and minifier
  • Oxc Documentation— oxlint achieves 50-100x speedup over ESLint
  • Rolldown GitHub— Powers Rolldown bundler as the parsing and transformation engine

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产