semstrait

Crates.iosemstrait
lib.rssemstrait
version0.0.1
created_at2026-01-24 20:57:09.437606+00
updated_at2026-01-24 20:57:09.437606+00
descriptionCompile semantic models to Substrait compute plans
homepage
repositoryhttps://github.com/semstrait/semstrait
max_upload_size
id2067465
size14,748
Jonas Björk (jonbjo)

documentation

README

semstrait

Compile semantic models to Substrait compute plans

⚠️ This project is under active development and not yet ready for use.

What is semstrait?

semstrait is a Rust library that transforms YAML-based semantic model definitions into Substrait compute plans, enabling engine-agnostic analytics.

YAML Schema → semstrait → Substrait Plan → Any Engine
                                              ├── DataFusion
                                              ├── DuckDB
                                              ├── Velox
                                              └── ...

Planned Features

  • Semantic Modeling — Define dimensions, measures, metrics, and joins in YAML
  • Query Resolution — Resolve business queries against the semantic model
  • Substrait Output — Generate portable compute plans for any Substrait-compatible engine
  • Lightweight — Pure Rust library, no runtime server required

Example (Planned API)

use semstrait::{Schema, Query, emit_plan};

let schema = Schema::from_file("model.yaml")?;
let query = Query::new("sales")
    .rows(["dates.year", "markets.country"])
    .metrics(["revenue", "quantity"]);

let plan = emit_plan(&schema, &query)?;
// Execute on DataFusion, DuckDB, or any Substrait consumer

Status

🚧 Pre-release — API is unstable and documentation is incomplete.

Follow the repo for updates or star it to show interest.

License

Licensed under the Apache License, Version 2.0.

Commit count: 1

cargo fmt