Investigate vendoring rusqlite in m-c
Categories
(Core :: SQLite and Embedded Database Bindings, task, P3)
Tracking
()
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!
Reporter | ||
Comment 1•5 years ago
|
||
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!
Reporter | ||
Comment 2•5 years ago
|
||
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.
Reporter | ||
Updated•5 years ago
|
Updated•3 months ago
|
Description
•