[package] name = "cotton-tools" version = "0.1.0" edition.workspace = true license.workspace = true publish.workspace = true description = "CottonDB's tool surface: the 183 MCP handlers, Ctx, Writer and the generated catalogue — linked by the server, the Mac and the phone alike." [lib] name = "cotton_tools" path = "src/lib.rs" [dependencies] cotton-store = { path = "../cotton-store" } cotton-core = { path = "../cotton-core" } rusqlite.workspace = true serde.workspace = true serde_json.workspace = true thiserror.workspace = true sha2.workspace = true hex.workspace = true base64.workspace = true # The synthetic household's generated pictures are PNGs, and a PNG's rows are # DEFLATE. Already in the tree (cotton-core inflates zips with it). Only the # synthetic household reads it, so only `test-fixtures` brings it. miniz_oxide = { version = "0.8", optional = true } # `SystemRandom` is the operating system's generator. NOT a runtime: `rand` # brings no executor, which is what keeps this crate linkable into a phone. rand.workspace = true # The two language dictionaries the tool surface is swept against are # JavaScript regexes, and three handler groups parse with more. regex.workspace = true # A facade, not a runtime: `tracing` compiles to nothing without a subscriber, # and the one on a phone is whatever the app installs. tracing.workspace = true chrono = { version = "0.4", default-features = false, features = ["std", "clock", "alloc"] } # A connection's server URL is judged by its host (`connections::judge`): a # parser, not a client — this crate still dials nothing. url.workspace = true [features] # `cotton_tools::test_fixtures`: receipts for a test's file (a peer's op, an # author's fact, a raw row reconciled), and `cotton_tools::synthetic`, the # invented household tests seed. Turned on only from a crate's # `[dev-dependencies]`, never in a build that ships. test-fixtures = ["cotton-store/fixtures", "dep:miniz_oxide"] [dev-dependencies] # Turns on `cotton_store::test_template`: every fixture here wants a fresh # workspace file, and a restored copy of a prebuilt one costs a thirtieth of # the migration ladder `create_workspace` runs from zero. Dev-only. cotton-store = { path = "../cotton-store", features = ["test-template"] } # Itself with its fixtures on, for `tests/` (as `cotton-store` does). cotton-tools = { path = ".", features = ["test-fixtures"] } # Tests exercise the device signer and served ingest; production injects its rails. cotton-client = { path = "../cotton-client", default-features = false, features = ["ingest"] } # The synthetic household test writes a real file in a folder of its own. tempfile.workspace = true