Parser
The Rust crate oxc_parser
is production ready.
Features
- 3x faster than swc parser (benchmark).
- Parses
.js(x)
and.ts(x)
. - Passes all parser tests from Test262 and 99% from Babel and TypeScript.
- Utility for extracting ESM import and export data - a better
es-module-lexer
. - ✅ works with checker.ts
Installation
Rust
Use the umbrella crate oxc or the individual oxc_ast and oxc_parser crates.
Rust usage example can be found here.
Node.js (NAPI)
Try the experimental node binding oxc-parser.
This package does not have an AST visitor nor TypeScript typings for the AST yet.
ESM Module Lexer
- Use the npm package
oxc-parser
with the APImoduleLexerSync
. - Use the crate oxc_module_lexer.