gecko-dev/storage/rust/Cargo.toml
Lina Cambridge 3e894ac30e Bug 1482608 - Add basic Rust bindings for mozStorage. r=nika,asuth,mak
This commit wraps just enough of the mozStorage API to support the
bookmarks mirror. It's not complete: for example, there's no way
to open, clone, or close a connection, because the mirror handles
that from JS. The wrapper also omits shutdown blocking and retrying on
`SQLITE_BUSY`.

This commit also changes the behavior of sync and async mozStorage
connections. Async (`mozIStorageAsyncConnection`) methods may be called
from any thread on any connection. Sync (`mozIStorageConnection`)
methods may be called from any thread on a sync connection, and from
background threads on an async connection. All connections now QI
to `mozIStorageConnection`, but attempting to call a sync method on
an async connection from the main thread throws.

Finally, this commit exposes an `OpenedConnection::unsafeRawConnection`
getter in Sqlite.jsm, for JS code to access the underlying connection.

Differential Revision: https://phabricator.services.mozilla.com/D20073

--HG--
extra : moz-landing-system : lando
2019-03-25 04:49:18 +00:00

14 lines
374 B
TOML

[package]
name = "storage"
description = "Rust bindings for mozStorage."
version = "0.1.0"
authors = ["Lina Cambridge <lina@yakshaving.ninja>"]
edition = "2018"
[dependencies]
libc = "0.2"
nserror = { path = "../../xpcom/rust/nserror" }
nsstring = { path = "../../xpcom/rust/nsstring" }
storage_variant = { path = "../variant" }
xpcom = { path = "../../xpcom/rust/xpcom" }