| Crates.io | chryso |
| lib.rs | chryso |
| version | 0.0.1 |
| created_at | 2026-01-23 17:59:15.192617+00 |
| updated_at | 2026-01-23 17:59:15.192617+00 |
| description | Chryso is a Calcite-style SQL parser + optimizer engine in Rust. |
| homepage | https://github.com/hawkingrei/chryso |
| repository | https://github.com/hawkingrei/chryso |
| max_upload_size | |
| id | 2065169 |
| size | 168,348 |
Chryso is a Calcite-style SQL parser + optimizer engine in Rust. It focuses on a clean, modular pipeline (AST -> logical plan -> Cascades optimizer -> physical plan -> adapter) and keeps the core engine execution-agnostic.
crates/
core/ AST, errors, formatting helpers
parser/ Dialect-aware parser
planner/ Logical/physical plan definitions + builder
optimizer/ Cascades skeleton (memo, rules, cost)
metadata/ Catalog, stats cache, analyze hooks
adapter/ Execution adapters (DuckDB, mock)
parser_yacc/ Yacc scaffold (validation)
src/
lib.rs Facade crate re-exports
bin/
chryso-cli.rs
Run the CLI (mock adapter by default):
cargo run --bin chryso-cli
Run the DuckDB demo:
cargo run --example duckdb_demo --features duckdb
All tests:
cargo test
With DuckDB:
cargo test --features duckdb
Plan snapshot tests:
tests/testdata/plan/case1/in.jsontests/testdata/plan/case1/out.jsonRecord snapshots:
CHRYSO_RECORD=1 cargo test --test plan_snapshot
docs/ARCHITECTURE.md for the planning pipeline and module overviewdocs/RULES.md for rule conventions and current rule setdocs/ADAPTERS.md for adapter designdocs/ROADMAP.md for milestones and TODOsTBD.