libsql icon indicating copy to clipboard operation
libsql copied to clipboard

[IDEA] Drop in replacement for libsqlite3-sys

Open Sytten opened this issue 1 year ago • 2 comments

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?

Sytten avatar Mar 06 '24 20:03 Sytten

@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.

aminya avatar Mar 08 '24 22:03 aminya

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

Sytten avatar Mar 08 '24 22:03 Sytten