Skip to main content
Toasty is an async ORM for Rust maintained by the Tokio project. It ships a native Turso driver (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
1

Install Toasty with the Turso driver

2

Define your models

Toasty derives schema, queries, and relations from plain Rust structs:
models.rs
3

Connect to Turso

Pass a turso: URL to Db::builder — either an in-memory database or a file path:
To enable Turso’s MVCC journal so multiple writers can run concurrently, build the driver explicitly and pass it to build():
When concurrent_writes() is enabled, write-write conflicts surface as a serialization failure — check err.is_serialization_failure() and retry the transaction.
4

Create the schema and query

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 the experimental_* toggles for Turso’s engine features.
  • The turso crate quickstart shows how to use Turso Database directly without an ORM, including sync against Turso Cloud.