From b945e9b2a06ef67c47d13ed93cd1b75bcb2324d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6sters?= Date: Mon, 21 Apr 2025 10:13:46 +0200 Subject: [PATCH] docs: add Rust to "Getting Started" section --- README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d7619dab9..cc72d1133 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ In the future, we will be also working on:
You can install the latest `limbo` release with: -```shell +```shell curl --proto '=https' --tlsv1.2 -LsSf \ https://github.com/tursodatabase/limbo/releases/latest/download/limbo_cli-installer.sh | sh ``` @@ -72,6 +72,24 @@ cargo run ``` +
+🦀 Rust +
+ +```console +cargo add limbo +``` + +Example usage: + +```rust +let db = Builder::new_local("sqlite.db").build().await?; +let conn = db.connect()?; + +let res = conn.query("SELECT * FROM users", ()).await?; +``` +
+
✨ JavaScript
@@ -144,7 +162,7 @@ defer stmt.Close() rows, _ = stmt.Query() for rows.Next() { - var id int + var id int var username string _ := rows.Scan(&id, &username) fmt.Printf("User: ID: %d, Username: %s\n", id, username) @@ -153,7 +171,7 @@ for rows.Next() {
- + ☕️ Java