Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Sagitta
Rust framework for building analytical data services on Arrow Flight and DataFusion.
Features
- Arrow Flight & Flight SQL — all RPC methods (Handshake, ListFlights, GetFlightInfo, GetSchema, DoGet, DoPut, DoExchange, DoAction, ListActions, PollFlightInfo) plus full Flight SQL command support
- SQL via DataFusion — DDL (CREATE/DROP/ALTER TABLE, CREATE/DROP VIEW, CREATE/DROP SCHEMA), DML (INSERT, UPDATE, DELETE, MERGE), queries (joins, subqueries, CTEs, window functions, aggregates), transactions, savepoints, and prepared statements
- Pluggable storage — implement the
Storetrait for custom backends; ships with an in-memory store - Pluggable authentication — implement
UserStorefor custom identity providers; ships with basic auth, bearer tokens, and mTLS - Custom actions — extend
DoAction/ListActionswith application-specific handlers via theCustomActiontrait - TLS & mTLS — optional transport security with configurable client certificate requirements
- Configuration — TOML files with environment variable override (
SAGITTA_CONFIG) - Observability — structured logging via
tracing, health checks, graceful shutdown
Installation
# Cargo.toml
[]
= "0.1"
Quick Start
# Copy and edit configuration (or skip to use defaults)
The server listens on 0.0.0.0:50051 by default.
Usage
Add sagitta as a dependency and use Sagitta to build a custom server:
use Arc;
use ;
use InMemoryUserStore;
use MemoryStore;
async
Crates
| Crate | Purpose |
|---|---|
sagitta |
Server framework library and default binary |
sagitta-core |
Core types, error handling, shared utilities |
sagitta-store |
Storage backend abstraction and implementations |
Configuration
See sagitta.example.toml for all options:
| Section | Key | Default | Description |
|---|---|---|---|
| (root) | listen_addr |
0.0.0.0:50051 |
Server listen address |
| (root) | catalog_name |
default |
Catalog name for SQL queries |
| (root) | default_schema |
public |
Default schema name |
| (root) | enable_test_fixtures |
false |
Load test datasets on startup |
[logging] |
level |
info |
Log level (trace/debug/info/warn/error) |
[logging] |
format |
pretty |
Log format (pretty or json) |
[server] |
shutdown_timeout_secs |
30 |
Graceful shutdown timeout |
[server] |
tcp_keepalive_secs |
60 |
TCP keepalive interval (0 to disable) |
[server] |
max_connections |
0 |
Max concurrent connections (0 = unlimited) |
[tls] |
cert_path |
— | Server certificate path |
[tls] |
key_path |
— | Server private key path |
[tls] |
ca_path |
— | CA certificate for mTLS |
[tls] |
client_auth_optional |
false |
Allow missing client certs in mTLS |
Error Handling
Sagitta surfaces errors via anyhow::Result at the server level. Storage and auth errors implement std::error::Error and are propagated through the Flight RPC status codes.
API Reference
Full API documentation is generated with cargo doc:
Or browse the published docs at docs.rs/sagitta.
Examples
See the examples/ directory for runnable examples:
| Example | Description |
|---|---|
custom_server.rs |
Custom server with custom actions |
Development
Prerequisites
- Rust (stable toolchain, 1.95+)
Building
Running
Testing
Linting & Formatting
Benchmarks
Docker
Publishing
The crate is automatically published to crates.io when CI passes on main.
Update the version in the root Cargo.toml before merging to trigger a new release.
Minimum Supported Rust Version
Rust 1.95+ (edition 2024).
Licence
Apache-2.0