Merge 'Rename limbo crate to turso' from Pekka Enberg

Closes #1884
This commit is contained in:
Pekka Enberg
2025-06-29 13:20:36 +03:00
8 changed files with 40 additions and 40 deletions

22
Cargo.lock generated
View File

@@ -1720,16 +1720,6 @@ dependencies = [
"vcpkg",
]
[[package]]
name = "limbo"
version = "0.1.0-pre.2"
dependencies = [
"tempfile",
"thiserror 2.0.12",
"tokio",
"turso_core",
]
[[package]]
name = "limbo-go"
version = "0.1.0-pre.2"
@@ -1880,12 +1870,12 @@ dependencies = [
"antithesis_sdk",
"clap",
"hex",
"limbo",
"tempfile",
"tokio",
"tracing",
"tracing-appender",
"tracing-subscriber",
"turso",
]
[[package]]
@@ -3669,6 +3659,16 @@ dependencies = [
"tracing-log",
]
[[package]]
name = "turso"
version = "0.1.0-pre.2"
dependencies = [
"tempfile",
"thiserror 2.0.12",
"tokio",
"turso_core",
]
[[package]]
name = "turso_cli"
version = "0.1.0-pre.2"

View File

@@ -1,13 +1,13 @@
# Copyright 2025 the Limbo authors. All rights reserved. MIT license.
# Copyright 2025 the Turso authors. All rights reserved. MIT license.
[package]
name = "limbo"
name = "turso"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "Limbo Rust API"
description = "Turso Rust API"
[features]
default = []

View File

@@ -1,4 +1,4 @@
use limbo::Builder;
use turso::Builder;
#[tokio::main]
async fn main() {

View File

@@ -1,6 +1,6 @@
//! # Limbo bindings for Rust
//! # Turso bindings for Rust
//!
//! Limbo is an in-process SQL database engine, compatible with SQLite.
//! Turso is an in-process SQL database engine, compatible with SQLite.
//!
//! ## Getting Started
//!
@@ -8,7 +8,7 @@
//!
//! ```rust,no_run
//! # async fn run() {
//! use limbo::Builder;
//! use turso::Builder;
//!
//! let db = Builder::new_local(":memory:").build().await.unwrap();
//! let conn = db.connect().unwrap();
@@ -21,7 +21,7 @@
//!
//! ```rust,no_run
//! # async fn run() {
//! # use limbo::Builder;
//! # use turso::Builder;
//! # let db = Builder::new_local(":memory:").build().await.unwrap();
//! # let conn = db.connect().unwrap();
//! let mut stmt = conn.prepare("SELECT * FROM users WHERE email = ?1").await.unwrap();

View File

@@ -27,22 +27,22 @@ use sealed::Sealed;
///
/// - For heterogeneous parameter lists of 16 or less items a tuple syntax is supported
/// by doing `(1, "foo")`.
/// - For hetergeneous parameter lists of 16 or greater, the [`limbo::params!`] is supported
/// by doing `limbo::params![1, "foo"]`.
/// - For hetergeneous parameter lists of 16 or greater, the [`turso::params!`] is supported
/// by doing `turso::params![1, "foo"]`.
/// - For homogeneous parameter types (where they are all the same type), const arrays are
/// supported by doing `[1, 2, 3]`.
///
/// # Example (positional)
///
/// ```rust,no_run
/// # use limbo::{Connection, params};
/// # async fn run(conn: Connection) -> limbo::Result<()> {
/// # use turso::{Connection, params};
/// # async fn run(conn: Connection) -> turso::Result<()> {
/// let mut stmt = conn.prepare("INSERT INTO test (a, b) VALUES (?1, ?2)").await?;
///
/// // Using a tuple:
/// stmt.execute((0, "foobar")).await?;
///
/// // Using `limbo::params!`:
/// // Using `turso::params!`:
/// stmt.execute(params![1i32, "blah"]).await?;
///
/// // array literal — non-references
@@ -62,22 +62,22 @@ use sealed::Sealed;
///
/// - For heterogeneous parameter lists of 16 or less items a tuple syntax is supported
/// by doing `(("key1", 1), ("key2", "foo"))`.
/// - For hetergeneous parameter lists of 16 or greater, the [`limbo::params!`] is supported
/// by doing `limbo::named_params!["key1": 1, "key2": "foo"]`.
/// - For hetergeneous parameter lists of 16 or greater, the [`turso::params!`] is supported
/// by doing `turso::named_params!["key1": 1, "key2": "foo"]`.
/// - For homogeneous parameter types (where they are all the same type), const arrays are
/// supported by doing `[("key1", 1), ("key2, 2), ("key3", 3)]`.
///
/// # Example (named)
///
/// ```rust,no_run
/// # use limbo::{Connection, named_params};
/// # async fn run(conn: Connection) -> limbo::Result<()> {
/// # use turso::{Connection, named_params};
/// # async fn run(conn: Connection) -> turso::Result<()> {
/// let mut stmt = conn.prepare("INSERT INTO test (a, b) VALUES (:key1, :key2)").await?;
///
/// // Using a tuple:
/// stmt.execute(((":key1", 0), (":key2", "foobar"))).await?;
///
/// // Using `limbo::named_params!`:
/// // Using `turso::named_params!`:
/// stmt.execute(named_params! {":key1": 1i32, ":key2": "blah" }).await?;
///
/// // const array:
@@ -106,7 +106,7 @@ pub enum Params {
/// # Example
///
/// ```rust
/// # use limbo::{Connection, params_from_iter, Rows};
/// # use turso::{Connection, params_from_iter, Rows};
/// # async fn run(conn: &Connection) {
///
/// let iter = vec![1, 2, 3];

View File

@@ -1,4 +1,4 @@
use limbo::{Builder, Value};
use turso::{Builder, Value};
#[tokio::test]
async fn test_rows_next() {

View File

@@ -16,16 +16,16 @@ path = "main.rs"
[features]
default = []
antithesis = ["limbo/antithesis"]
antithesis = ["turso/antithesis"]
[dependencies]
anarchist-readable-name-generator-lib = "0.1.0"
antithesis_sdk = "0.2.5"
clap = { version = "4.5", features = ["derive"] }
limbo = { path = "../bindings/rust" }
tokio = { version = "1.29.1", features = ["full"] }
anarchist-readable-name-generator-lib = "0.1.0"
hex = "0.4"
tempfile = "3.20.0"
tokio = { version = "1.29.1", features = ["full"] }
tracing = "0.1.41"
tracing-appender = "0.2.3"
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
tempfile = "3.20.0"
turso = { path = "../bindings/rust" }

View File

@@ -5,7 +5,6 @@ use antithesis_sdk::random::{get_random, AntithesisRng};
use antithesis_sdk::*;
use clap::Parser;
use core::panic;
use limbo::Builder;
use opts::Opts;
use std::collections::HashSet;
use std::fs::File;
@@ -16,6 +15,7 @@ use tracing_appender::non_blocking::WorkerGuard;
use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
use tracing_subscriber::EnvFilter;
use turso::Builder;
pub struct Plan {
pub ddl_statements: Vec<String>,
@@ -427,7 +427,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let opts = Opts::parse();
if opts.nr_threads > 1 {
println!("ERROR: Multi-threaded data access is not yet supported: https://github.com/tursodatabase/limbo/issues/1552");
println!("ERROR: Multi-threaded data access is not yet supported: https://github.com/tursodatabase/turso/issues/1552");
return Ok(());
}
@@ -462,7 +462,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
}
if let Err(e) = conn.execute(stmt, ()).await {
match e {
limbo::Error::SqlExecutionFailure(e) => {
turso::Error::SqlExecutionFailure(e) => {
if e.contains("Corrupt database") {
panic!("Error creating table: {}", e);
} else {
@@ -511,7 +511,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
}
if let Err(e) = conn.execute(sql, ()).await {
match e {
limbo::Error::SqlExecutionFailure(e) => {
turso::Error::SqlExecutionFailure(e) => {
if e.contains("Corrupt database") {
panic!("Error executing query: {}", e);
} else if e.contains("UNIQUE constraint failed") {