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
50,314 downloads per month
Used in 184 crates
(12 directly)
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, andlast - 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