Favicon of Oxc

Oxc

Oxc is a Rust-based collection of high-performance JavaScript and TypeScript tools: parser, linter, transformer, minifier, and resolver.

Open Source Alternative to:
Oxc website screenshot
Oxc GitHub repository preview

Oxc (the Oxidation Compiler) is a set of Rust-built tools for parsing, linting, transforming, minifying, and resolving JavaScript and TypeScript. It's aimed at developers building JS tooling (bundlers, linters, formatters) or teams who want faster lint and build steps than JS-based tools provide. Oxc already powers Rolldown (Vite's bundler) and is used by projects like Nuxt, Nova, and Preact.

Key features

  • Oxlint: a fast linter for JavaScript and TypeScript, runnable via npx oxlint@latest.
  • Oxfmt: a code formatter for JS/TS, runnable via npx oxfmt@latest.
  • Parser: parses JavaScript and TypeScript into an AST for use in other tools.
  • Transformer: transforms TypeScript, JSX, and modern JavaScript syntax down to compatible targets.
  • Minifier: shrinks JavaScript output for production builds.
  • Resolver: resolves module specifiers for JavaScript and TypeScript projects, used by projects like Nova, swc-node, and knip.
  • Rust implementation: all tools are written in Rust, which is the source of their speed relative to JS-based equivalents.

Ideal use cases

Oxc fits teams building custom JS/TS tooling on top of a fast parser or resolver instead of writing their own from scratch. It also fits projects that want a drop-in faster linter (Oxlint) or formatter (Oxfmt) to replace slower JS-based tools in CI or local dev, without changing much else in the workflow. Bundler and build-tool authors can use the transformer and minifier components directly instead of shipping their own TS-to-JS transform or minification pass.

It's a good fit if you're already comfortable pulling in Rust-based CLI tools or Rust crates into a JS-focused pipeline, and if raw lint/build speed matters to your codebase size. It's not a good fit if you need a mature plugin ecosystem matching ESLint's plugin catalog exactly, since Oxlint's rule set and plugin surface differ from ESLint's. It's also not the right pick if you want a all-in-one framework or bundler out of the box. Oxc supplies the underlying tools; something like Rolldown is the bundler built on top of it.

Installation

Most people interact with Oxc through its packaged tools rather than building the compiler itself.

To lint a codebase, run Oxlint directly with npx:

npx oxlint@latest

To format a codebase, run Oxfmt:

npx oxfmt@latest

For building tooling on top of Oxc's components (parser, transformer, minifier, resolver), consult the individual usage guides on the project website: the parser guide, transformer guide, minifier guide, and resolver guide (linked from oxc.rs/docs/guide/usage/). Since Oxc is a Rust project, integrating its crates (such as oxc_resolver) into a Rust codebase follows the normal cargo add workflow, pulling the relevant crate from crates.io or from source.

For contributing to the project itself, clone the repository and follow the steps in CONTRIBUTING.md, or check the contributing guide on the website. Good first issues are tagged on GitHub, and the team is reachable on Discord for questions.

The project also has an online playground (playground.oxc.rs) for trying out the parser and transformer without installing anything locally.

Frequently asked questions

Share:

Stars
22.5K
Forks
1.2K
Last commit
22 hours ago
Repository age
4 years
License
MIT
Self-hosted
No
Activity score
81/100
View Repository
Ad
Favicon

 

  
 

Similar to Oxc

Favicon

 

  
 
Favicon

 

  
 
Favicon