Toasty is an async ORM for Rust maintained by the Tokio project. It ships a native Turso driver (Documentation Index
Fetch the complete documentation index at: https://docs.turso.tech/llms.txt
Use this file to discover all available pages before exploring further.
toasty-driver-turso) that connects to a local Turso Database file or an in-memory database — the same engine you get from the turso crate.
The Toasty Turso driver currently targets local and in-memory databases. For sync against Turso Cloud, drop down to the
turso crate directly.Prerequisites
- Rust 1.95 or newer (Toasty’s minimum supported version)
- A Rust project (
cargo init) - Tokio as your async runtime
Connect to Turso
Pass a
turso: URL to Db::builder — either an in-memory database or a file path:In-memory
In-memory
File-backed
File-backed
With concurrent writes (MVCC)
With concurrent writes (MVCC)
To enable Turso’s MVCC journal so multiple writers can run concurrently, build the driver explicitly and pass it to When
build():concurrent_writes() is enabled, write-write conflicts surface as a serialization failure — check err.is_serialization_failure() and retry the transaction.Where to go next
- The Toasty guide covers models, relations, transactions, and migrations.
- The Turso chapter of the Toasty guide documents the connection URL forms, the
concurrent_writes()flag, and theexperimental_*toggles for Turso’s engine features. - The
tursocrate quickstart shows how to use Turso Database directly without an ORM, including sync against Turso Cloud.