[package]name = "cotton-ffi"version = "0.1.0"edition.workspace = truelicense.workspace = truepublish.workspace = truedescription = "The C ABI the phone links: six functions, JSON in and out, one tokio runtime inside the handle."[lib]name = "cotton_ffi"path = "src/lib.rs"# `staticlib` is what Swift links — one binary, no dylib to sign separately and# no dynamic loader (design M1). `rlib` is here so the crate's own tests and the# header generator can `use cotton_ffi::…`; it changes nothing about what ships.crate-type = ["staticlib", "rlib"][dependencies]# Declared WITHOUT its default features: the phone gets `data_dir`,# `identity`, `layout`, `replica`, `media`, `seams`, `sync`, `connection` and# `transport`, and the ingest sources and the backup are simply not compiled.cotton-client = { path = "../cotton-client", default-features = false }# The 183 tool handlers, which is what a decision taken in the window RUNS# (design P3).cotton-tools = { path = "../cotton-tools" }cotton-core = { path = "../cotton-core", features = ["lab-pdf"] }cotton-store = { path = "../cotton-store" }# The browse layer binds its own parameters. The driver is the store's; this is# the VALUE type its `all`/`get` take, and the addon is already compiled for# every crate above.rusqlite = { workspace = true, features = ["backup"] }# Local snapshots hash their inventory and publish a private staged directory.sha2.workspace = true# A .torrent shared in is named by the SHA-1 of its info dictionary (`phone::share_fetch`).sha1 = "0.10"flate2.workspace = truehex.workspace = truechrono-tz = "0.10"tempfile.workspace = truerand.workspace = true# A host setting that is an address is parsed, never pattern-matched# (`methods::host_settings`).url.workspace = true# Reading the base64url device seed the Keychain handed down.base64.workspace = true# Native keys used by a business staff claim are wiped on both phone and Mac.zeroize = { version = "1", features = ["derive"] }# One timestamp format for a log line, the same one every row in the file uses.chrono = { version = "0.4", default-features = false, features = ["std", "clock", "alloc"] }serde.workspace = trueserde_json.workspace = true# Search within a recording finds é as e (chat_recordings.rs; cotton-core has it already).unicode-normalization = "0.1"# The runtime lives in Rust (design M2): `cotton_open` builds ONE multi-threaded# runtime inside the handle, and every long job is a command with events rather# than a blocking call.tokio.workspace = true# The vision bridge IS a `VisionService`, and that trait is async — one attribute# macro.async-trait.workspace = truetracing.workspace = true# An album ZIP shared into Music is read from its central directory and streamed# entry by entry (`phone::songs_zip`); cotton-store links the same crate for a# package. The Dashlane suite builds its synthetic export archive with it too.zip.workspace = true# The PDF a note exports as embeds Figtree; its widths and glyphs are read here.ttf-parser = "0.25"[dev-dependencies]# `passkey.create` / `passkey.sign` tests verify the signature a site would check.p256.workspace = true# `signin_approval` tests verify the claim a Worker would check.ed25519-dalek.workspace = truecotton-client = { path = "../cotton-client", default-features = false, features = ["test-fixtures"] }# `cotton_tools::test_fixtures`: receipts for the rows a test seeds.cotton-tools = { path = "../cotton-tools", features = ["test-fixtures"] }reqwest.workspace = true# Turns on `cotton_store::test_template`, so a test gets its workspace file for# the price of a copy rather than a migration ladder, and `fixtures` for the# open bundle's synthetic library. Dev-only: a shipping build of this crate# never compiles either module.cotton-store = { path = "../cotton-store", features = ["test-template", "fixtures"] }# `test-util` is NOT in tokio's `full`: the vision bridge's two-minute wait is# tested by advancing a paused clock rather than by waiting two minutes.tokio = { workspace = true, features = ["test-util"] }# The header is GENERATED and COMMITTED, and `tests/header.rs` fails the build# when the two drift. cbindgen is a dev-dependency rather than an installed CLI# so the check runs wherever `cargo test` does, with no second tool to provision# on a runner.cbindgen = { version = "0.29", default-features = false }