5 releases
Uses new Rust 2024
| new 0.0.4 | Feb 14, 2026 |
|---|---|
| 0.0.3 | Feb 12, 2026 |
| 0.0.2 | Jan 30, 2026 |
| 0.0.1 | Jan 23, 2026 |
| 0.0.0 | Oct 20, 2025 |
#47 in Parser tooling
1,678 downloads per month
Used in 174 crates
(147 directly)
270KB
4K
SLoC
💎 Oak Core
The Engine of Language Intelligence — oak-core is the heartbeat of the Oak ecosystem, providing the fundamental data structures and algorithms required for high-performance, incremental language processing.
🎯 Project Vision
Modern developer tools demand more than just a static parser; they require a dynamic system that can react to every keystroke. oak-core is built to provide this infrastructure. It abstracts away the complexities of incremental parsing, syntax tree management, and error recovery, allowing language authors to focus on the unique semantics of their language.
✨ Core Pillars
- 🌳 Persistent Syntax Trees: Implements the "Green/Red Tree" architecture, enabling efficient immutability, lossless code representation, and high-performance tree transformations.
- 🔄 Universal Incrementalism: Provides a generic framework for incremental updates that can be applied to any language, ensuring that only the necessary parts of the AST are re-evaluated.
- 🛡️ Advanced Error Recovery: Features a sophisticated suite of recovery strategies that allow parsers to produce meaningful syntax trees even from highly fragmented or incorrect source code.
- 🚀 Zero-Cost Abstractions: Written in pure Rust, the core ensures that the flexibility of the Oak framework comes with minimal runtime overhead.
- 🧩 Extensible Framework: Designed as a modular library, it serves as the base for all
oak-*parsers and high-level tools likeoak-lsp.
🏗️ Architecture at a Glance
- Green Tree: An immutable, simplified, and address-agnostic representation of the syntax tree, optimized for sharing and caching.
- Red Tree: A thin, type-safe layer over the Green Tree that provides parent pointers and absolute positioning, optimized for developer ergonomics.
- Lexer/Parser Traits: Standardized interfaces that ensure consistency across all language implementations in the Oak ecosystem.
Dependencies
~5–7.5MB
~60K SLoC