107 releases (breaking)

Uses new Rust 2024

new 0.110.0 Jan 19, 2026
0.108.0 Jan 12, 2026
0.106.0 Dec 29, 2025
0.99.0 Nov 24, 2025
0.38.0 Nov 26, 2024

#1787 in Programming languages

Download history 24084/week @ 2025-09-29 26295/week @ 2025-10-06 28431/week @ 2025-10-13 36321/week @ 2025-10-20 22778/week @ 2025-10-27 14026/week @ 2025-11-03 15051/week @ 2025-11-10 13830/week @ 2025-11-17 12126/week @ 2025-11-24 14006/week @ 2025-12-01 13494/week @ 2025-12-08 13503/week @ 2025-12-15 7825/week @ 2025-12-22 8675/week @ 2025-12-29 15221/week @ 2026-01-05 17523/week @ 2026-01-12

50,314 downloads per month
Used in 184 crates (12 directly)

MIT license

160KB
2.5K SLoC

Oxc Data Structures

Common data structures and utilities used across oxc crates.

Overview

This crate provides specialized data structures and utilities that are used throughout the oxc toolchain. These structures are optimized for the specific needs of compiler and tooling workloads.

Key Features

  • Stacks: Efficient stack types, optimized for fast push, pop, and last
  • Code buffer: Efficient string building with segment tracking
  • Inline strings: Memory-efficient string storage for short strings
  • Slice iterators: Enhanced iteration capabilities for slices
  • Rope data structure: Efficient text manipulation for large documents
  • Box macros: Macros for creating boxed arrays / slices (similar to vec! macro)

Architecture

These data structures are designed with specific compiler requirements in mind:

  • Performance: Optimized for common patterns in parsing and code generation
  • Memory efficiency: Minimize allocations and memory overhead
  • Safety: Provide safe abstractions over potentially unsafe operations
  • Ergonomics: Easy to use APIs that integrate well with other oxc components

The structures complement Rust's standard library with domain-specific optimizations for JavaScript/TypeScript tooling.

Dependencies

~130KB