tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.55k stars 252 forks source link

[IDEA] Drop in replacement for libsqlite3-sys #1152

Open Sytten opened 6 months ago

Sytten commented 6 months ago

Hi there!

We are currently using a statically linked sqlite3 with libsqlite3-sys (using the "bundled" flag) with the diesel ORM in Caido. I would like to try libsql since the missing ALTER COLUMN in sqlite3 is a PITA and like you said the devs are not receptive to community contributions. It would be nice if I could just do something like:

[patch.crates-io]
libsqlite3-sys = { git = "https://github.com/tursodatabase/libsql", branch = "main" }

I don't think it would be that hard to do, probably just bundling the sqlite in one file sqlite3.c (+ sqlite3ext.h and sqlite3.h) and running codegen.

I don't know if someone attempted that before?

aminya commented 6 months ago

@Sytten Is this needed to use Turso with Diesel?

I was also going to try Turso, but I could not find documentation or examples that use Diesel. Is there a way to do that? I'd rather keep the application layer mostly backend-independent by using Diesel instead of using the libsql crate.

Sytten commented 6 months ago

We dont need turso so probably not for me but it could likely work?