Mobile, tablet and embedded apps live or die on how they talk to the network. Hand-rolled API calls turn into slow screens, stale data and unresponsive UIs โ and every team rebuilds the same caching, retry and state-sync plumbing from scratch.
The Vantage framework is built to be the backbone of that app. It's written in Rust, slots into any architecture, and gives you a data-abstraction layer with local caches, running on a background thread, implementing best-practice persistence over the network โ so your UI thread stays smooth and your data stays fresh.
It's the same engine that powers Vantage UI. The difference: it's fully open-source, so you can build your own app directly on top of it.
Where it sits in your app๐
Your app
UI & business logic โ native, mobile, embedded or desktopVantage data layer
typed models ยท local cache ยท reactive events ยท background threadYour data
SQL ยท SurrealDB ยท MongoDB ยท REST ยท GraphQLWhat you get๐
Typed & safe
Model entities as native Rust types. The compiler catches mismatches, and capability traits stop you calling insert on a read-only source.
Swap backends, keep your code
Move an entity between SQLite, Postgres, SurrealDB, Mongo or a REST API without changing your app logic.
Local cache, off the main thread
Diorama keeps a local copy in memory or on disk, serves reads instantly, and refreshes on a background task โ even when the backend is slow or rate-limited.
Reactive & live
When data changes, everything watching hears about it โ grids re-render, forms update. Build reactive UIs without hand-rolling state sync.
Virtualized loading
Viewport-driven sparse paging fetches only the rows on screen, so a million-row list stays smooth.
Mock-testable
Mocks at the SDK level let you unit-test business logic with no database and no network โ fast, deterministic CI.
The framework, in full๐
- Entity framework for Rust โ model Client, Order, Invoice as native types and keep business logic type-safe across a large codebase.
- SQL builder with dialects & extensions โ a typed query builder that speaks SQLite, Postgres and MySQL, and reaches vendor extensions like CTEs, window functions and JSONB.
- Instant model traversal (sync) โ follow one-to-many and many-to-many references synchronously; traversal just rewrites conditions, even across databases.
- Typed entities for a shared library โ define your entities once in a crate the whole org versions and reuses.
- Aggregation with expressions โ sum, avg, min and max built from composable expressions that compile to native queries.
- Active Record & Active Entity โ load a record, mutate it and call
save(), or work entity-first when that fits better. - Unit-test your persistence logic โ swap in a mock persistence and test business logic with no database and no network.
- Custom type systems โ per-backend type universes (CBOR for SurrealDB, BSON for Mongo, native SQL) with strict, no-silent-cast conversions.
- Roll your own datasource โ implement the traits to add a backend Vantage doesn't ship yet โ Oracle, a message queue, your internal store โ and everything above works on it.
One model, any backend๐
// A typed entity, queried without writing SQL.
let clients = Client::table(db)
.with_condition(clients.is_paying().eq(true));
// Reads come from a local cache, refreshed on a background task โ
// the same handle works over SQLite, Postgres, SurrealDB or Mongo.
let lens = Lens::new()
.cache_at("./cache.redb")
.refresh_every(Duration::from_secs(30))
.build()?;
Ship it across your org๐
Build your model once as an ordinary Rust crate, version it internally, and let every team build on the same typed foundation. Because it's just a Rust library, you expose it to other languages with the usual binding crates โ you can even link it straight into an existing service.
- Rust โ first-class, today. The core, query builders, the Diorama cache and reactive handles all ship on crates.io at 0.5.x.
- Python โ today, via PyO3. A working binding keeps business logic in pure Rust and calls it from Python.
- TypeScript & Java โ same pattern. The type-erased core is built to bridge out; wire it up with the binding crate for your target.
- Rust UI toolkits. Ready-made DataGrid adapters for GPUI, egui, Slint, Tauri, ratatui and Cursive (
vantage-ui-adapters). - Browser (WASM) โ on the way. Running the data layer in the browser is on the roadmap, not shipping yet.
check_circleThe Rust data layer is production-ready and published today. Language bridges beyond Python and WASM/browser targets are still maturing โ build on the Rust core now, and grow into the rest.