oxc_data_structures

Crates.iooxc_data_structures
lib.rsoxc_data_structures
version0.83.0
created_at2024-10-03 04:33:46.467627+00
updated_at2025-08-29 06:50:56.154728+00
descriptionA collection of JavaScript tools written in Rust.
homepagehttps://oxc.rs
repositoryhttps://github.com/oxc-project/oxc
max_upload_size
id1394887
size129,511
Boshen (Boshen)

documentation

README

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

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.

Commit count: 11571

cargo fmt