Skip to content

Commit 8bb6269

Browse files
Support readme in the crates and bump version (#44)
* add readme and tag check * bump version to 0.1.1-rc.3 * Revert "add readme and tag check" This reverts commit 56bb072. * update dedicate readme
1 parent b2da58b commit 8bb6269

4 files changed

Lines changed: 105 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace.package]
2-
version = "0.1.0"
2+
version = "0.1.1-rc.3"
33
edition = "2024"
44
description = "High performance query engine for both offline compute and online serving"
55
authors = ["btnokami"]

crates/skardi/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ authors.workspace = true
77
repository.workspace = true
88
homepage.workspace = true
99
license.workspace = true
10+
readme = "README.md"
1011

1112
[package.metadata.docs.rs]
1213
all-features = true

crates/skardi/README.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# skardi
2+
3+
High-performance query engine for AI and agents, powered by [Apache DataFusion](https://datafusion.apache.org/).
4+
5+
Query files, databases, data lakes, and vector stores with SQL — and serve results as parameterized pipelines.
6+
7+
[![Crates.io](https://img.shields.io/crates/v/skardi.svg)](https://crates.io/crates/skardi)
8+
[![Docs.rs](https://docs.rs/skardi/badge.svg)](https://docs.rs/skardi)
9+
[![License](https://img.shields.io/crates/l/skardi.svg)](https://github.com/SkardiLabs/skardi/blob/main/LICENSE)
10+
11+
## Modules
12+
13+
| Module | Description |
14+
|--------|-------------|
15+
| `engine` | SQL query execution engine backed by DataFusion |
16+
| `pipeline` | Declarative SQL pipelines with parameter inference |
17+
| `model` | ONNX model loading and inference (behind `onnx` feature) |
18+
| `sources` | Data source connectors: CSV, Parquet, PostgreSQL, MySQL, SQLite, MongoDB, Redis, Iceberg, Lance |
19+
20+
## Installation
21+
22+
```toml
23+
[dependencies]
24+
skardi = "0.1"
25+
26+
# With ONNX model inference
27+
skardi = { version = "0.1", features = ["onnx"] }
28+
```
29+
30+
## Quick Start
31+
32+
### Execute a SQL query
33+
34+
```rust,no_run
35+
use skardi::engine::datafusion::DataFusionEngine;
36+
use skardi::engine::Engine;
37+
use datafusion::prelude::*;
38+
39+
#[tokio::main]
40+
async fn main() -> anyhow::Result<()> {
41+
let ctx = SessionContext::new();
42+
ctx.register_csv("products", "data/products.csv", CsvReadOptions::new()).await?;
43+
44+
let engine = DataFusionEngine::new(ctx);
45+
let result = engine.execute("SELECT * FROM products WHERE price < 100").await?;
46+
47+
println!("{} rows returned", result.num_rows());
48+
Ok(())
49+
}
50+
```
51+
52+
### Load and run a pipeline
53+
54+
```rust,no_run
55+
use skardi::pipeline::pipeline::{Pipeline, StandardPipeline};
56+
use datafusion::prelude::*;
57+
use std::sync::Arc;
58+
59+
#[tokio::main]
60+
async fn main() -> anyhow::Result<()> {
61+
let ctx = Arc::new(SessionContext::new());
62+
63+
// Pipeline YAML defines a parameterized SQL query
64+
let pipeline = StandardPipeline::load_from_file("pipeline.yaml", ctx).await?;
65+
66+
println!("Pipeline: {} v{}", pipeline.name(), pipeline.version());
67+
Ok(())
68+
}
69+
```
70+
71+
A pipeline YAML looks like this:
72+
73+
```yaml
74+
metadata:
75+
name: product-search
76+
version: 1.0.0
77+
78+
query: |
79+
SELECT name, price FROM products
80+
WHERE ({brand} IS NULL OR brand = {brand})
81+
AND price < {max_price}
82+
LIMIT {limit}
83+
```
84+
85+
Parameters are automatically inferred from `{placeholders}` in the SQL.
86+
87+
## Feature Flags
88+
89+
| Feature | Description |
90+
|---------|-------------|
91+
| `onnx` | Enables ONNX model inference via the `model` module |
92+
93+
## Further Reading
94+
95+
- [API Reference](https://docs.rs/skardi) — full rustdoc for all modules
96+
- [GitHub Repository](https://github.com/SkardiLabs/skardi) — server, CLI, demos, and deployment guide
97+
- [Crate Page](https://crates.io/crates/skardi)
98+
99+
## License
100+
101+
Apache-2.0

0 commit comments

Comments
 (0)