{"name":"Oxc: High-Performance JavaScript Tools Written in Rust","description":"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","url":"https://osrepos.com/repo/oxc-project-oxc","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/oxc-project-oxc","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/oxc-project-oxc.md","json":"https://osrepos.com/repo/oxc-project-oxc.json","topics":["Rust","JavaScript","TypeScript","Linter","Formatter","Compiler","Minifier","Developer Tools"],"keywords":["Rust","JavaScript","TypeScript","Linter","Formatter","Compiler","Minifier","Developer Tools"],"stars":null,"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.","content":"## Introduction\n\nOxc 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.\n\nThe project emphasizes several core design principles:\n*   **Performance:** Achieved through rigorous engineering.\n*   **Correctness:** Ensured by conformance testing to standards.\n*   **Developer Experience:** Provided through clear APIs, comprehensive documentation, and sensible configuration.\n*   **Modular Composability:** Allowing individual components to be used independently or composed into complete toolchains.\n\nOxc offers a suite of tools including a linter, formatter, parser, transformer, minifier, and resolver, all built for speed and reliability.\n\n## Installation\n\nOxc provides various tools available as npm packages for Node.js environments and individual crates for Rust projects.\n\n### Linter (oxlint)\n\nTo quickly lint your JavaScript/TypeScript projects:\nbash\nnpx oxlint@latest\n\n\n### Formatter (oxfmt)\n\nFor fast, opinionated code formatting compatible with Prettier:\nbash\nnpx oxfmt@latest\n\n\n### Parser (oxc-parser)\n\nInstall the fastest JavaScript/TypeScript parser for Node.js:\nbash\nnpm install oxc-parser\n\n\n### Transformer (oxc-transform)\n\nFor TypeScript, React, and modern JavaScript transformation:\nbash\nnpm install oxc-transform\n\n\n### Minifier (oxc-minify)\n\nIntegrate the high-performance JavaScript minifier:\nbash\nnpm install oxc-minify\n\n\n### Rust Crates\n\nFor building your own JavaScript tools in Rust, individual crates are available:\ntoml\n[dependencies]\noxc = \"0.x\"\n\n\n## Examples\n\nHere are quick examples demonstrating the usage of Oxc's core tools.\n\n### Linter Example\n\nLinting a project is as simple as running:\nbash\nnpx oxlint@latest\n\nOxlint can process thousands of files in under a second, as demonstrated in the `vscode` repository.\n\n### Parser Example (Node.js)\n\nParse JavaScript code and get the Abstract Syntax Tree (AST):\njs\nimport { parseSync } from 'oxc-parser';\nconst result = parseSync('const x = 1;');\nconsole.log(result);\n\n\n### Transformer Example (Node.js)\n\nTransform TypeScript or React code:\njs\nimport { transform } from 'oxc-transform';\nconst code = 'const Component = () => <div />;';\nconst result = transform('source.tsx', code, { typescript: true, react: true });\nconsole.log(result.code);\n\n\n### Minifier Example (Node.js)\n\nMinify JavaScript code with optional mangling:\njs\nimport { minify } from 'oxc-minify';\nconst code = 'function longFunctionName() { console.log(\"hello\"); }';\nconst result = minify(code, { mangle: true });\nconsole.log(result.code); // Expected: function a(){console.log(\"hello\")}\n\n\n## Why Use Oxc?\n\nOxc 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.\n\nMajor projects and companies are already adopting Oxc, including:\n*   **Rolldown** (Vite's future bundler) for parsing, transformation, and minification.\n*   **Nuxt** for parsing.\n*   **Preact**, **Shopify**, **ByteDance**, and **Shopee** for linting with `oxlint`.\n*   **Nova**, `swc-node`, and `knip` for module resolution using `oxc_resolver`.\n\nBy 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.\n\n## Links\n\n*   **GitHub Repository:** [oxc-project/oxc](https://github.com/oxc-project/oxc)\n*   **Official Website:** [oxc.rs](https://oxc.rs)\n*   **Documentation:** [oxc.rs/docs](https://oxc.rs/docs)\n*   **Discord Community:** [Join Discord](https://discord.gg/9uXCAwqQZW)\n*   **Playground:** [playground.oxc.rs](https://playground.oxc.rs/)\n*   **Sponsor Oxc:** [Sponsor Boshen](https://github.com/sponsors/Boshen)","metrics":{"detailViews":3,"githubClicks":1},"dates":{"published":null,"modified":"2025-10-28T16:03:05.000Z"}}