JavaScript 氧化编译器
The JavaScript Oxidation Compiler

原始链接: https://oxc.rs/

## Oxc:高性能 JavaScript 工具 Oxc 是一系列基于 Rust 的快速工具集合,用于现代 JavaScript 开发,旨在成为下一代工具的基础。它包括一个**代码检查器 (Oxlint)**、一个**格式化工具 (Oxfmt)**、一个**解析器 (oxc-parser)**、一个**转换器 (oxc-transform)**、一个**解析器 (oxc-resolver)**,以及一个**压缩器 (oxc-minify)**。 Oxlint 拥有比 ESLint 快 50-100 倍的速度,并提供 650 多个规则,利用真正的类型感知能力。 Oxfmt 提供比 Biome 快 3 倍、比 Prettier 快 35 倍的格式化速度。核心解析器 `oxc-parser` 比 SWC 快 3 倍,并且完全符合 Test262 标准。 Oxc 优先考虑速度和兼容性,旨在与现有工作流程(ESLint 插件、Prettier)保持一致,同时提供显著的性能提升。它是免费且开源的,由社区贡献和赞助支持。在 [GitHub](https://github.com/Oxc-dev) 上探索生态系统并做出贡献。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 JavaScript 氧化编译器 (oxc.rs) 10 分,modinfo 1 小时前 | 隐藏 | 过去的 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文
ByVoidZero

The JavaScript Oxidation Compiler

A collection of high-performance JavaScript tools written in Rust

Foundation of Modern JavaScript Tooling

Linter

Oxlint: ESLint-compatible linter

Catch bugs before they make it to production

  • 50~100x faster than ESLint
  • 650+ rules and growing
  • True type-aware Linting powered by tsgo
  • Support for ESLint JS Plugins
Usage Guide
Linter
Formatter (Alpha)

Oxfmt: Prettier-compatible formatter

Enforce consistent code styles

  • 3x faster than Biome
  • 35x faster than Prettier
  • Tailwind class sorting support
Usage Guide
Linter
Parser

oxc-parser

The foundation for advanced transformations and compilations

  • 3x faster than SWC
  • Parses .js(x) and .ts(x)
  • Passes all Test262 stage4 tests
Usage Guide

Parser Benchmark for Oxc, Swc and Biome

OXC

/ 26.3ms

SWC

/ 84.1ms

Biome

/ 130.1ms

Parsing typescript.js on Macbook Pro M3 Max | Source

Transformer

oxc-transform

Transpile source code at the speed of thought

  • TypeScript & JSX
  • Syntax lowering to ES2015
  • Isolated Declarations DTS Emit
  • React Fast Refresh, styled-components, and more
Usage Guide
Transformer
Resolver

oxc-resolver

Node.js-compatible CJS and ESM module resolution

  • Behavior alignment with enhanced-resolve
  • 28x faster than enhanced-resolve
  • Highly customizable
Usage Guide
Resolver
Minifier (Alpha)

oxc-minify

Compress and optimize

  • Dead code elimination
  • Syntax shortening & whitespace removal
  • Variable name mangling
Usage Guide

Free & open source

Oxc is free and open source, made possible by wonderful sponsors.

Become a Sponsor
Brought to you by VoidZero
联系我们 contact @ memedata.com