feat: gate the store behind a feature and document the schema as a contract

This commit is contained in:
randogoth 2026-09-28 23:41:11 +03:00
parent 8fb5661b53
commit aa3950bc80
6 changed files with 122 additions and 16 deletions

View file

@ -6,7 +6,12 @@ description = "Smol Mail client library: identities, sealing, mailbox operations
license = "Apache-2.0"
[features]
default = ["bundled-sqlite"]
default = ["store", "bundled-sqlite"]
# Local state in SQLite: the store module and the client operations that take
# one. Off, the crate keeps identities, addresses, seal/open and the raw
# transport operations for hosts with their own database and thin FFI
# consumers that need only the crypto and envelope layer.
store = ["dep:rusqlite"]
# Bundle libsqlite3 so the store needs no system SQLite; embedders with their
# own SQLite (Android's NDK case) build with default-features = false.
bundled-sqlite = ["rusqlite/bundled"]
@ -23,7 +28,7 @@ sha2 = "0.10"
hmac = "0.12"
hkdf = "0.12"
rand_core = { version = "0.6", features = ["getrandom"] }
rusqlite = "0.32"
rusqlite = { version = "0.32", optional = true }
data-encoding = "2"
[dev-dependencies]