Closed Bug 1604678 Opened 5 years ago Closed 5 years ago

Investigate vendoring rusqlite in m-c

Categories

(Core :: SQLite and Embedded Database Bindings, task, P3)

task

Tracking

()

RESOLVED DUPLICATE of bug 1626323

People

(Reporter: lina, Unassigned)

Details

rusqlite is a Rust binding for SQLite, used in the application services Rust components and (soon!) rkv.

In the past, :asuth suggested shipping it on Desktop, letting consumers use it directly instead of going through mozStorage. This means, in turn, that we can vendor those crates as they are, instead of writing pluggable storage backends, and shipping a mozStorage-specific one in m-c. Of course, if Rust code is already using an existing mozStorage connection, like Places, there's no need to use rusqlite, and those callers can continue to use the Rust wrapper in storage/rust.

However, rusqlite also bundles its own copy of SQLite in an internal libsqlite3-sys dependency. We need to configure it to use Firefox's copy—either the one in third_party/sqlite3, or the system one if we're building with MOZ_SYSTEM_SQLITE.

Thom pointed out that we can require libsqlite3-sys to use our version of SQLite using env variables, though that depends on this bug being fixed; we definitely don't want pkg-config rummaging around for SQLite! If we can fix that, and set the vars in the same place we configure SQLite in m-c, we might be able to get this working!

At our kickoff yesterday, Thom said he got this working! 🎉 (Though, I think, in his own words, he's not sure why it works yet). We'll want this for extension storage, so assigning this bug to him!

Assignee: nobody → tchiovoloni

Glandium, CCing you to get this on your radar, tooo. Basically, we'd like to vendor this library in the tree. It brings along a libsqlite3-sys crate, with bindgen bindings and (optionally) its own copy of SQLite. We'd like to have it link to the SQLite that we already build as part of Firefox.

Assignee: tchiovoloni → nobody
No longer blocks: 1623245
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.