Oxc是什么?
🌐 What is Oxc?
/oʊ ɛks siː/
Oxidation 编译器是一套用 Rust 编写的高性能 JavaScript 和 TypeScript 工具集合。
🌐 The Oxidation Compiler is a collection of high-performance tools for JavaScript and TypeScript written in Rust.
Oxc 是 VoidZero 对统一高性能 JavaScript 工具链愿景的一部分。它驱动着 Rolldown(Vite 的未来打包器),并支持新一代超高速开发工具,实现无缝协作。
🌐 Oxc is part of VoidZero's vision for a unified, high-performance toolchain for JavaScript. It powers Rolldown (Vite's future bundler) and enables the next generation of ultra-fast development tools that work seamlessly together.
* 氧化是产生锈蚀的化学过程
整个技术栈中最快的工具
🌐 Fastest tooling across the stack
Oxc 专注于整个工具链的性能。这包括解析、模块解析、代码规范检查、格式化、转换和压缩。
🌐 Oxc focuses on performance across the whole toolchain. This includes parsing, module resolution, linting, formatting, transforms, and minification.
哲学
🌐 Philosophy
Oxc 是建立在几个核心理念之上的。
🌐 Oxc is built around a few core ideas.
性能是一项特性
🌐 Performance is a feature
Oxc 将速度视为产品需求。更快的工具可以改善本地反馈循环并降低持续集成成本。性能回退被视为 bug。
🌐 Oxc treats speed as a product requirement. Faster tools improve the local feedback loop and reduce CI cost. Performance regressions are treated as bugs.
一个工具链,共享构建模块
🌐 One toolchain, shared building blocks
Oxc 是一个套件。像 linter、formatter、parser、transformer、minifier 和 resolver 这样的工具都建立在共享组件之上。这减少了重复工作,并使整个系统的行为更加一致。
🌐 Oxc is a suite. Tools like the linter, formatter, parser, transformer, minifier, and resolver are built on shared components. This reduces duplicated work and makes behavior more consistent across the stack.
正确性与明确的界限
🌐 Correctness with clear boundaries
OXC的目标是准确且可预测。当行为与其他工具不同时,应有记录。兼容性是一个特点,不是偶然。
🌐 Oxc aims to be correct and predictable. When behavior differs from other tools, the differences should be documented. Compatibility is a feature, not an accident.
实用的开发者体验
🌐 Practical developer experience
Oxc 专注于适用于实际项目的工作流程。默认设置应合理,配置应易于理解,输出应稳定。
🌐 Oxc focuses on a workflow that works in real projects. Defaults should be sensible, configuration should be understandable, and output should be stable.
你得到的
🌐 What you get
Oxc 包括面向终端用户的工具和可重用的编译器构建模块:
🌐 Oxc includes end-user tools and reusable compiler building blocks:
- Oxlint 是最快的 JavaScript 和 TypeScript 代码检查工具。
- Oxfmt 是最快的格式化工具。它以与 Prettier 兼容的格式为目标。
- Parser 是速度最快的 JS 和 TS 解析器,带有用于工具的 AST。
- Transformer 提供最快的 TS、JSX 和现代 JavaScript 转换。
- Minifier 是用于生产输出的最快压缩工具。
- Resolver 是用于 JS 和 TS 项目的最快模块解析器。
你可以单独使用每个工具,也可以将它们组合成一个工具链一起使用。
🌐 You can use each tool on its own, or use them together as one toolchain.
Oxc 适合谁
🌐 Who Oxc is for
- 应用和库开发者,希望在本地和持续集成中实现最快的 lint 和格式化循环。
- 工具链和平台团队 希望在大规模下获得快速的编译器级基础。
- 工具作者希望获得用于 JS 工具的快速可重用的 crate 或 npm 包。
