196 releases (breaking)

Uses new Rust 2024

new 0.135.0 Jun 8, 2026
0.133.0 May 26, 2026
0.123.0 Mar 30, 2026
0.106.0 Dec 29, 2025
0.0.1 Mar 30, 2023

#14 in #javascript-linter

Download history 9218/week @ 2026-03-03 70381/week @ 2026-03-10 66990/week @ 2026-03-17 63251/week @ 2026-03-24 53642/week @ 2026-03-31 60916/week @ 2026-04-07 63346/week @ 2026-04-14 59769/week @ 2026-04-21 66717/week @ 2026-04-28 79125/week @ 2026-05-05 96145/week @ 2026-05-12 109971/week @ 2026-05-19 111115/week @ 2026-05-26 104663/week @ 2026-06-02

434,599 downloads per month
Used in 381 crates (123 directly)

MIT license

1.5MB
27K SLoC

Oxc Parser

High-performance JavaScript and TypeScript parser with comprehensive language support.

Overview

This crate provides a fast, spec-compliant parser for JavaScript and TypeScript that produces a complete Abstract Syntax Tree (AST). It supports all modern language features including JSX, TSX, and the latest ECMAScript proposals.

Key Features

  • Complete language support: JavaScript, TypeScript, JSX, and TSX
  • Latest ECMAScript: All stable ECMAScript features plus stage 3+ proposals
  • High performance: Significantly faster than traditional parsers
  • Error recovery: Continues parsing after errors to provide complete AST
  • Comprehensive AST: Detailed node information with accurate source positions

Architecture

Parser Design

  • Recursive descent: Traditional recursive descent parser architecture
  • Error recovery: Sophisticated error recovery for IDE-friendly parsing
  • Memory efficient: Uses arena allocation for optimal performance
  • Streaming: Processes source text in a single pass

Language Support

  • JavaScript: Full ECMAScript 2024+ support
  • TypeScript: Complete TypeScript syntax including decorators
  • JSX/TSX: React JSX and TypeScript JSX syntax
  • Proposals: Stage 3 decorators and other advancing proposals

AST Structure

The parser produces an AST that closely follows ECMAScript specifications:

  • Accurate positions: Every node has precise source location information
  • Complete information: Preserves all syntactic details including trivia
  • Type-safe: Leverages Rust's type system for correctness
  • Visitor-friendly: Designed for easy traversal and transformation

The parser is designed as the foundation for all other oxc tools, providing the high-quality AST needed for analysis, transformation, and code generation.

Dependencies

~3–4.5MB
~72K SLoC