[package] name = "cotton-store" version = "0.1.0" edition.workspace = true license.workspace = true publish.workspace = true description = "CottonDB's store: one SQLite file per person — schema, migrations, fold, outbox, search." [dependencies] cotton-rules = { path = "../cotton-rules" } rusqlite.workspace = true sha2.workspace = true # A receipt is signed by its device's key and checked against it (`signed`). ed25519-dalek.workspace = true base64.workspace = true hex.workspace = true serde.workspace = true serde_json.workspace = true chrono = { version = "0.4", default-features = false, features = ["std"] } thiserror.workspace = true # The calling thread's QoS class and granted priority (`thread_band`). libc = "0.2" # The canonical form of a receipt writes every string in NFC (`canonical`). unicode-normalization = "0.1" # The Cotton package (`cottonpkg`) is a zip: a manifest, one JSON Lines file # per table and the media its records name. zip.workspace = true [features] # The on-disk workspace-file template `test_template` provides. Enabled by the # dev-dependencies of the crates whose TESTS want a file cheaply, never by a # shipping build. `rusqlite/backup` is how an in-memory copy is restored. test-template = ["rusqlite/backup"] # A file at any schema version and the synthetic owner file (`fixtures`), for # the tests of every crate that proves an upgrade. Turned on by # dev-dependencies only — this crate's own below, the server's and the tools'. fixtures = [] [dev-dependencies] # Parse diagnostic arguments rather than matching comments or string contents. syn = { version = "2", features = ["full", "visit"] } proc-macro2 = { version = "1", features = ["span-locations"] } quote = "1" # The tests here are INTEGRATION tests: they link the crate rather than living # inside it, so the crate's own dependencies are not theirs. The two # CONFORMANCE lanes and the vectors they replay live in `cotton-conformance`, # which owns both (spec R9) — this crate is what they are pointed at. # `backup` because `test_template` is compiled into this crate's own tests too. rusqlite = { workspace = true, features = ["backup"] } serde.workspace = true serde_json.workspace = true # Itself, with the fixtures on: an integration test links the crate as a # dependency, so this is how `tests/` reaches `cotton_store::fixtures`. cotton-store = { path = ".", features = ["fixtures"] } sha2.workspace = true tempfile.workspace = true # The simulator's wire encoder must be exercised by ordinary workspace tests. [[example]] name = "seed-receipts" test = true [[example]] name = "receipt-owners-cost" required-features = ["fixtures"] [[example]] name = "receipt-query-plans" required-features = ["fixtures"]