Open source

Vantage Framework

The open-source Rust crates behind Vantage UI — a stack of thin abstractions for data across databases, APIs and infrastructure.

The Vantage framework is the open-source Rust data layer that powers Vantage UI. It is shipping on crates.io at 0.5.x, with per-crate docs on docs.rs and a full mdBook. The API is still evolving — expected at 0.x — but it is production code: it builds Vantage UI itself.

Nine layers — go as far as you need

A stack of thin abstractions, built from the foundation up. They're not independent — Table stands on the DataSource and DataSet crates beneath it — but you climb only as far as your app needs and ignore the rest. In plenty of cases, Table is the whole job.

1

Data source vantage-sql vantage-surrealdb vantage-mongodb vantage-csv

Any backend — SQL, SurrealDB, MongoDB, a REST or GraphQL API, CSV, an append-only log, the AWS CLI — implements a small set of source traits.

call_splitRoll your own. A comprehensive guide walks you through building a data source for any new datasource (e.g. Oracle, a message queue or your internal store). Code it yourself, or hand the guide to your AI coding agent.

2

DataSet traits & Core vantage-dataset vantage-core vantage-types vantage-expressions

Readable, Writable, Insertable and ActiveEntity — the contract for listing, reading and changing rows. Underneath sit the shared foundations: the error model, the persistence-aligned type system, and the database-agnostic expression layer.

3

Table vantage-table

Table<Source, Entity> plugs an arbitrary data source into those traits, then adds typed columns, composable conditions, relations and computed expressions.

call_splitRoll your own. This is where you model your business entities as a compile-time type system — typed columns, relations and expressions. It's what earns you real compile-time safety in Rust across a large codebase.

4

Vista vantage-vista

Erases both the backend and the entity type into one universal, schema-bearing handle. Everything below this line talks to a Vista — never to your database directly.

5

Vista from a Table — or from YAML vantage-vista-factory

Build a Vista straight from a typed Table, or from a YAML spec. Go through the YAML root and the factory catalog resolves references across different persistences — a Postgres row linked to a Mongo collection.

call_splitRoll your own. The YAML path is itself the no-Rust route — declare a source, its schema and references entirely in config, and the factory builds the Vista.

6

Diorama vantage-diorama

A bare Vista has only the capabilities of its source. Diorama wraps it with a local cache so a read-only CSV can count, paginate, search and sort — and it pushes real-time updates out to the UI elements bound to it (and to connected live clients, once a WebSocket connector lands).

7

Lens vantage-diorama

The Lens decides caching strategy: which backend holds the cache (usually ReDB), how much to pre-fetch, and how to invalidate it.

call_splitRoll your own. The Lens is where you own that strategy — set the pre-fetch window and invalidation rules, and route writes and events through your own callbacks.

8

Scenery vantage-diorama

Table, Record and Value sceneries drive a reactive UI. Each bumps a generation counter when its data moves, and the interface re-renders — no manual state-sync.

9

Your integration vantage-cli-util vantage-ui-adapters

The top of the stack is yours — an API server, a command-line tool, a bespoke UI. You write it, but you don't start cold: Vantage ships connectors, including an axum server integration, DataGrid adapters for six Rust UI toolkits, and CLI helpers.

call_splitRoll your own. Wrap any layer below in your own API or CLI. The connectors are a head start, not a cage — your surface, your logic.

It's all modular — depend only on the crates you need. Most data-source crates expose an optional vista feature, and an optional rhai feature layers scripting on top. Rolling your own tables? You generally need neither.

What the code feels like

Real snippets from the book. Step through them.

The crate map

Every published crate, all at 0.5.x. Pull in only the layers you use.

Core

Result type, error model and base traits.
The persistence-aligned type system and Record types.
Database-agnostic expression AST with push-down.
The DataSet / ValueSet traits and idempotency rules.
Table, columns and operation traits over any backend.

Universal handle

Universal, schema-bearing data handle.
Multi-datasource catalog and cross-persistence reference traversal.

Reactive cache

Cached, composable, reactive surface — Lens, Dio and Scenery.

Backends

Postgres, MySQL and SQLite.
SurrealDB native client.
MongoDB with native pipeline support.
REST and GraphQL HTTP API backends.
CSV files as a dataset.
Embedded redb key-value store.
Append-only JSONL log files.
AWS API backend — incubating.
CBOR-based SurrealDB client.

Tooling & adapters

Paginated REST client pool — rate limiting and cursors.
CLI utilities for the framework.
vantage-ui-adapters
DataGrid adapters for GPUI, egui, Slint, Tauri, ratatui and Cursive. Ships with the UI.
Roadmap

Your data, exported as an API

Today the framework consumes HTTP backends — vantage-api-client maps REST and GraphQL into tables, and vantage-api-pool handles paginated, rate-limited fetches.

The reverse is in progress: a generic, open-source crate that exports your typed entities as a clean REST/GraphQL endpoint from minimal boilerplate, without losing the framework's capabilities. A genuinely generic API layer is rare in Rust — and it's the foundation the Vantage UI API-generation feature will build on.

Bring your own backend

Vantage UI's reach is bounded by the framework's connector list. Adding a backend is a well-defined six-step process in the book's Adding a New Persistence chapter.

  1. 1.Define the type system
  2. 2.Implement expressions
  3. 3.Implement operators
  4. 4.Build the query builder
  5. 5.Wire CRUD on Table
  6. 6.Add relationships and multi-backend support

Bringing a new database, message broker or infrastructure source into Vantage UI? That's the path. Pull requests welcome on github.com/romaninsh/vantage.

menu_book Read the Book developer_board Build your own app