# Oxc: High-Performance JavaScript Tools Written in Rust

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/oxc-project-oxc
Generated for open source discovery and AI-assisted research.

Oxc is a high-performance collection of JavaScript and TypeScript tools built in Rust, designed to be a unified and ultra-fast toolchain. It powers projects like Rolldown, Vite's future bundler, and offers modular components for linting, formatting, parsing, transforming, and minifying code, emphasizing performance and correctness.

GitHub: https://github.com/oxc-project/oxc
OSRepos URL: https://osrepos.com/repo/oxc-project-oxc

## Summary

Oxc is a high-performance collection of JavaScript and TypeScript tools built in Rust, designed to be a unified and ultra-fast toolchain. It powers projects like Rolldown, Vite's future bundler, and offers modular components for linting, formatting, parsing, transforming, and minifying code, emphasizing performance and correctness.

## Topics

- Rust
- JavaScript
- TypeScript
- Linter
- Formatter
- Compiler
- Minifier
- Developer Tools

## Repository Information

Last analyzed by OSRepos: Tue Oct 28 2025 16:03:05 GMT+0000 (Western European Standard Time)
Detail views: 3
GitHub clicks: 1

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

Oxc is a high-performance collection of JavaScript and TypeScript tools written in Rust, designed to be a unified and ultra-fast toolchain. As part of VoidZero's vision, Oxc powers critical projects like Rolldown, Vite's future bundler, enabling the next generation of development tools that work seamlessly together.

The project emphasizes several core design principles:
*   **Performance:** Achieved through rigorous engineering.
*   **Correctness:** Ensured by conformance testing to standards.
*   **Developer Experience:** Provided through clear APIs, comprehensive documentation, and sensible configuration.
*   **Modular Composability:** Allowing individual components to be used independently or composed into complete toolchains.

Oxc offers a suite of tools including a linter, formatter, parser, transformer, minifier, and resolver, all built for speed and reliability.

## Installation

Oxc provides various tools available as npm packages for Node.js environments and individual crates for Rust projects.

### Linter (oxlint)

To quickly lint your JavaScript/TypeScript projects:
bash
npx oxlint@latest


### Formatter (oxfmt)

For fast, opinionated code formatting compatible with Prettier:
bash
npx oxfmt@latest


### Parser (oxc-parser)

Install the fastest JavaScript/TypeScript parser for Node.js:
bash
npm install oxc-parser


### Transformer (oxc-transform)

For TypeScript, React, and modern JavaScript transformation:
bash
npm install oxc-transform


### Minifier (oxc-minify)

Integrate the high-performance JavaScript minifier:
bash
npm install oxc-minify


### Rust Crates

For building your own JavaScript tools in Rust, individual crates are available:
toml
[dependencies]
oxc = "0.x"


## Examples

Here are quick examples demonstrating the usage of Oxc's core tools.

### Linter Example

Linting a project is as simple as running:
bash
npx oxlint@latest

Oxlint can process thousands of files in under a second, as demonstrated in the `vscode` repository.

### Parser Example (Node.js)

Parse JavaScript code and get the Abstract Syntax Tree (AST):
js
import { parseSync } from 'oxc-parser';
const result = parseSync('const x = 1;');
console.log(result);


### Transformer Example (Node.js)

Transform TypeScript or React code:
js
import { transform } from 'oxc-transform';
const code = 'const Component = () => <div />;';
const result = transform('source.tsx', code, { typescript: true, react: true });
console.log(result.code);


### Minifier Example (Node.js)

Minify JavaScript code with optional mangling:
js
import { minify } from 'oxc-minify';
const code = 'function longFunctionName() { console.log("hello"); }';
const result = minify(code, { mangle: true });
console.log(result.code); // Expected: function a(){console.log("hello")}


## Why Use Oxc?

Oxc stands out due to its commitment to performance, correctness, and developer experience. Written in Rust, it leverages the language's speed and safety features to deliver unparalleled execution times for common JavaScript development tasks. Its modular design allows developers to pick and choose the tools they need, integrating them seamlessly into existing workflows or building entirely new toolchains.

Major projects and companies are already adopting Oxc, including:
*   **Rolldown** (Vite's future bundler) for parsing, transformation, and minification.
*   **Nuxt** for parsing.
*   **Preact**, **Shopify**, **ByteDance**, and **Shopee** for linting with `oxlint`.
*   **Nova**, `swc-node`, and `knip` for module resolution using `oxc_resolver`.

By choosing Oxc, you're investing in a future-proof, high-performance toolchain that is actively developed and supported by a growing community and industry leaders.

## Links

*   **GitHub Repository:** [oxc-project/oxc](https://github.com/oxc-project/oxc)
*   **Official Website:** [oxc.rs](https://oxc.rs)
*   **Documentation:** [oxc.rs/docs](https://oxc.rs/docs)
*   **Discord Community:** [Join Discord](https://discord.gg/9uXCAwqQZW)
*   **Playground:** [playground.oxc.rs](https://playground.oxc.rs/)
*   **Sponsor Oxc:** [Sponsor Boshen](https://github.com/sponsors/Boshen)