Skip to content

Commit 6cb1620

Browse files
committed
add Readme.md file
1 parent 5d52bf4 commit 6cb1620

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# libsqlite-turso
2+
3+
A dynamic strategy wrapper for `libsqlite3.so` that allows any SQLite client to seamlessly connect to [Turso](https://turso.tech/) databases — with zero client-side changes.
4+
5+
This project provides drop-in `libsqlite3.so` support with automatic strategy selection depending on runtime context.
6+
7+
## ✨ Features
8+
9+
- ✅ Works with **any SQLite client** that uses `libsqlite3.so`
10+
- 🔁 Automatically picks between strategies:
11+
- **`EnvVarStrategy`** — for general use outside Globe
12+
- **`GlobeStrategy`** — for auto-authenticated execution inside a Globe edge function
13+
- 🔌 No custom SQLite client logic or HRANA knowledge required
14+
15+
---
16+
17+
## 🔧 Setup
18+
19+
### 1. Build the custom `libsqlite3.so`
20+
21+
```bash
22+
cargo build --release
23+
```
24+
25+
### 1. Place `libsqlite3.so` in your system
26+
27+
This project assumes `libsqlite3.so` is available at runtime.
28+
29+
Place it in a standard library path (e.g., `/usr/lib`, or use `/usr/local/lib/`).
30+
31+
---
32+
33+
## 🚀 Usage
34+
35+
Use **any standard SQLite library** in your language/runtime — this project handles the dynamic strategy and connection logic under the hood.
36+
37+
The strategy is selected automatically:
38+
39+
### 🌍 `GlobeStrategy` (used when running in Globe)
40+
41+
- Create database in Globe dashboard.
42+
- No environment variables are needed.
43+
- Just open the database using its name:
44+
45+
```rust
46+
sqlite3.open("my-database")
47+
```

0 commit comments

Comments
 (0)