tursodatabase / tursodatabase/libsql

[IDEA] Drop in replacement for libsqlite3-sys

Open
#1,152 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking how libsqlite3-sys currently bundles sqlite3.c, sqlite3ext.h, and sqlite3.h and how its code generation works. Then determine whether libsql can provide the same crate interface for Diesel; done means the proposed crates.io patch builds and works as a drop-in replacement.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, rust, sqlite
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.