base on ⚓ A collection of high-performance JavaScript tools. <p align="center"> <img alt="OXC Logo" src="https://cdn.jsdelivr.net/gh/oxc-project/oxc-assets/preview-universal.png" width="700"> </p> <div align="center"> [![MIT licensed][license-badge]][license-url] [![Build Status][ci-badge]][ci-url] [![Code Coverage][code-coverage-badge]][code-coverage-url] [![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/oxc-project/oxc) [![Sponsors][sponsors-badge]][sponsors-url] [![Discord chat][discord-badge]][discord-url] [![Playground][playground-badge]][playground-url] [![Website][website-badge]][website-url] </div> ## ⚓ Oxc _/oʊ ɛks siː/_ The Oxidation Compiler is a collection of high-performance tools for JavaScript and TypeScript written in Rust. Oxc is part of [VoidZero](https://voidzero.dev/)'s vision for a unified, high-performance toolchain for JavaScript. It powers [Rolldown](https://rolldown.rs) ([Vite]'s future bundler) and enables the next generation of ultra-fast development tools that work seamlessly together. For more information, check out our website at [oxc.rs](https://oxc.rs). <sub>\* Oxidation is the chemical process that creates rust</sub> ## 🏗️ Design Principles - **Performance**: Through rigorous performance engineering. - **Correctness**: Through conformance testing to standards and similar projects. - **Developer Experience**: Clear APIs, comprehensive documentation, and sensible configuration. - **Modular composability**: Use individual components independently or compose them into complete toolchains. Read more about our [architecture](https://oxc.rs/docs/learn/architecture/parser.html) and [performance philosophy](https://oxc.rs/docs/learn/performance). ## 📦 Tools & Packages | Tool | npm | crates.io | | ----------- | ------------------------------------------------------------ | ----------------------------------------------------------- | | Linter | [oxlint](https://www.npmjs.com/package/oxlint) | - | | Formatter | [oxfmt](https://www.npmjs.com/package/oxfmt) | - | | Parser | [oxc-parser](https://www.npmjs.com/package/oxc-parser) | [oxc_parser](https://crates.io/crates/oxc_parser) | | Transformer | [oxc-transform](https://www.npmjs.com/package/oxc-transform) | [oxc_transformer](https://crates.io/crates/oxc_transformer) | | Minifier | [oxc-minify](https://www.npmjs.com/package/oxc-minify) | [oxc_minifier](https://crates.io/crates/oxc_minifier) | | Resolver | [oxc-resolver](https://www.npmjs.com/package/oxc-resolver) | [oxc_resolver](https://crates.io/crates/oxc_resolver) | See [documentation](https://oxc.rs/) for detailed usage guides for each tool. ## ⚡️ Quick Start ### Linter The production-ready linter catches mistakes for you with sensible defaults and optional configuration: ```bash npx oxlint@latest ``` To give you an idea of its capabilities, here is an example from the [vscode] repository, which finishes linting 4800+ files in 0.7 seconds: <p float="left" align="left"> <img src="https://cdn.jsdelivr.net/gh/oxc-project/oxc-assets/linter-screenshot.png" width="60%"> </p> → [oxlint documentation](https://oxc.rs/docs/guide/usage/linter/cli.html) ### Formatter Fast, opinionated code formatter compatible with [Prettier]: ```bash npx oxfmt@latest ``` → [Formatter documentation](https://oxc.rs/docs/guide/usage/formatter) ### Parser (Node.js) The fastest JavaScript/TypeScript parser written in Rust: ```bash npm install oxc-parser ``` ```js import { parseSync } from "oxc-parser"; const result = parseSync("const x = 1;"); ``` → [Parser documentation](https://oxc.rs/docs/guide/usage/parser) ### Transformer (Node.js) TypeScript, React, and modern JavaScript transformation: ```bash npm install oxc-transform ``` ```js import { transform } from "oxc-transform"; const result = transform("source.tsx", code, { typescript: true }); ``` → [Transformer documentation](https://oxc.rs/docs/guide/usage/transformer) ### Minifier (Node.js) High-performance JavaScript minifier: ```bash npm install oxc-minify ``` ```js import { minify } from "oxc-minify"; const result = minify(code, { mangle: true }); ``` → [Minifier documentation](https://oxc.rs/docs/guide/usage/minifier) ### Rust Individual crates are published for building your own JavaScript tools: ```toml [dependencies] oxc = "0.x" ``` → [Rust documentation](https://docs.rs/oxc) ## VoidZero Inc. Oxc is a project of [VoidZero](https://voidzero.dev/), see our announcement [Announcing VoidZero - Next Generation Toolchain for JavaScript](https://voidzero.dev/blog). If you have requirements for JavaScript tools at scale, please [get in touch](https://forms.gle/WQgjyzYJpwurpxWKA)! ## 🙋 Who's using Oxc? [Rolldown] and [Nuxt] use Oxc for parsing. [Rolldown] also uses Oxc for transformation and minification. [Nova], [swc-node], and [knip] use [oxc_resolver][docs-resolver-url] for module resolution. [Preact], [Shopify], [ByteDance], and [Shopee] use oxlint for linting. [See more projects using Oxc →](https://oxc.rs/docs/guide/projects.html) ## ✍️ Contribute Check out some of the [good first issues](https://github.com/oxc-project/oxc/contribute) or ask us on [Discord][discord-url]. See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidance, or read the complete [contributing guide on our website →](https://oxc.rs/docs/contribute/introduction.html) If you are unable to contribute by code, you can still participate by: - Add a [GitHub Star](https://github.com/oxc-project/oxc/stargazers) to the project - Join us on [Discord][discord-url] - [Follow me on X](https://x.com/boshen_c) and post about this project ## 🤝 Credits This project was incubated with the assistance of these exceptional mentors and their projects: - [Biome][biome] - [@ematipico](https://github.com/ematipico) - [Ruff][ruff] - [@charliermarsh](https://github.com/charliermarsh), [@MichaReiser](https://github.com/MichaReiser) - [quick-lint-js](https://github.com/quick-lint/quick-lint-js) - [@strager](https://github.com/strager) - [elm-review](https://package.elm-lang.org/packages/jfmengels/elm-review/latest) - [@jfmengels](https://github.com/jfmengels) Special thanks go to: - [@domonji](https://github.com/domonji) for bootstrapping this project together and also completing the TypeScript parser - [@tongtong-lu](https://github.com/tongtong-lu) and [@guan-wy](https://github.com/guan-wy) for designing the [project logo](https://github.com/oxc-project/oxc-assets) ## ❤ Who's [Sponsoring Oxc](https://github.com/sponsors/Boshen)? <p align="center"> <a href="https://github.com/sponsors/Boshen"> <img src="https://raw.githubusercontent.com/Boshen/sponsors/main/sponsors.svg" alt="My sponsors" /> </a> </p> ## 📖 License Oxc is free and open-source software licensed under the [MIT License](./LICENSE). Oxc ports or copies code from other open source projects, their licenses are listed in [**Third-party library licenses**](./THIRD-PARTY-LICENSE). [discord-badge]: https://img.shields.io/discord/1079625926024900739?logo=discord&label=Discord [discord-url]: https://discord.gg/9uXCAwqQZW [license-badge]: https://img.shields.io/badge/license-MIT-blue.svg [license-url]: https://github.com/oxc-project/oxc/blob/main/LICENSE [ci-badge]: https://github.com/oxc-project/oxc/actions/workflows/ci.yml/badge.svg?event=push&branch=main [ci-url]: https://github.com/oxc-project/oxc/actions/workflows/ci.yml?query=event%3Apush+branch%3Amain [code-coverage-badge]: https://codecov.io/gh/oxc-project/oxc/graph/badge.svg?token=FVHEH0BQLJ [code-coverage-url]: https://codecov.io/gh/oxc-project/oxc [sponsors-badge]: https://img.shields.io/github/sponsors/Boshen [sponsors-url]: https://github.com/sponsors/Boshen [playground-badge]: https://img.shields.io/badge/Playground-blue?color=9BE4E0 [playground-url]: https://playground.oxc.rs/ [website-badge]: https://img.shields.io/badge/Website-blue [website-url]: https://oxc.rs [docs-resolver-url]: https://docs.rs/oxc_resolver [biome]: https://biomejs.dev/ [ruff]: https://beta.ruff.rs [vscode]: https://github.com/microsoft/vscode [rolldown]: https://rolldown.rs [vite]: https://vitejs.dev/ [nuxt]: https://nuxt.com/ [nova]: https://trynova.dev/ [swc-node]: https://github.com/swc-project/swc-node [knip]: https://github.com/webpro/knip [preact]: https://preactjs.com/ [shopify]: https://shopify.com/ [bytedance]: https://www.bytedance.com/ [shopee]: https://shopee.com/ [prettier]: https://prettier.io/ ", Assign "at most 3 tags" to the expected json: {"id":"4945","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"