Cotton code
116 lines · 4.5 KB · TOMLRaw
[package]name = "cotton-mac"version = "0.1.0"edition.workspace = truelicense.workspace = truepublish.workspace = truedescription = "The Mac app Cotton's importer: reads WhatsApp, Mail, Photos and Calls on this Mac and hands every row to the personal object over HTTPS. The object decides everything; nothing here matches, threads or de-duplicates."[lib]name = "cotton_mac"path = "src/lib.rs"# `pnpm music:import <folder> --zone <IANA zone> --base <url> --token-file <path>`: a folder of# the owner's songs into their object, by the phone's own rules (src/music).[[bin]]name = "music-import"path = "src/bin/music_import.rs"[[bin]]name = "health-import"path = "src/bin/health_import.rs"[[bin]]name = "seal-device"path = "src/bin/seal_device.rs"[[bin]]name = "seal-land"path = "src/bin/seal_land.rs"[[bin]]name = "seal-migrate"path = "src/bin/seal_migrate.rs"# A person's files sealed on this Mac: the film and fetch importers' uploads,# opening a file a phone sent, and re-sealing what an object stores in the clear.[[bin]]name = "meetings-transcribe"path = "src/bin/meetings_transcribe.rs"[[bin]]name = "meetings-summarise"path = "src/bin/meetings_summarise.rs"# The Mac's meetings job, as launchd wakes it (`pnpm -s meetings:job:install`).[[bin]]name = "meetings-job"path = "src/bin/meetings_job.rs"[[bin]]name = "seal-files"path = "src/bin/seal_files.rs"[dependencies]# The readers and the ingest framework, without the host half: no server, no# relay, no tunnel, no backup. `ingest` is the readers' own feature.cotton-client = { path = "../cotton-client", default-features = false, features = ["ingest"] }cotton-core = { path = "../cotton-core", features = ["lab-pdf"] }# The import engines run here over the importer's own copy (src/copy.rs), by# the questions the Worker's driver asked them (`import::asked`).cotton-rules = { path = "../cotton-rules" }cotton-store = { path = "../cotton-store" }serde.workspace = trueserde_json.workspace = truesha2.workspace = truesha1 = "0.10"hex.workspace = truerusqlite.workspace = truethiserror.workspace = true# Blocking: every reader is synchronous (`IngestSource::read` emits through a# callback), so the sink is too, and no runtime lives in the app.reqwest = { workspace = true, features = ["blocking"] }chrono-tz = "0.10"chrono = { version = "0.4", default-features = false, features = ["std", "clock", "alloc"] }# Mail (IMAP over TLS, MIME), the stack the old server's reader built on.mail-parser = "0.11"regex.workspace = truebase64.workspace = trueurl.workspace = truerustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }webpki-roots = "1"# WhatsApp's passkey: the DevTools client of the session host's Chrome broker,# a blocking WebSocket over its Unix socket; random markers, and logging.tungstenite = { version = "0.26", default-features = false, features = ["handshake"] }rand.workspace = true# This Mac's device key (src/approval.rs): its public half is its device id.ed25519-dalek.workspace = truetracing.workspace = true# Stopping the WhatsApp helper an earlier run left behind, by its pid.libc = "0.2"# Songs' tags and audio properties for `music-import`, pure Rust (the phone# reads the same fields with TagLib). Exact: a tag reader's mapping of keys is# its behaviour, so a new one comes in on purpose. Mac only: never a# dependency of cotton-core or cotton-ffi (cotton-ffi/tests/phone_boundary.rs).lofty = "=0.25.5"# An album ZIP (a Bandcamp download) for `music-import`: read entry by entry# from its central directory and streamed into a temp folder, never whole.zip.workspace = truetempfile.workspace = true# The vault key's private half and the opened VMK are wiped when dropped.zeroize = "1"[dev-dependencies]# A certificate made per run for the one-click POST's TLS loopback server (tests/mail_acts_edges.rs); the same# rcgen cotton-client's tests use, so no new crate.rcgen = { version = "0.13", default-features = false, features = ["pem", "ring"] }# Verifies the vault signer's ES256 signature in src/vault_passkey_tests.rs.p256.workspace = true# A synthetic copy to lay an open bundle from (tests/music_import.rs' round trip).cotton-store = { path = "../cotton-store", features = ["fixtures", "test-template"] }# The phone's approval, run over a synthetic file in src/vault_tests.rs.cotton-tools = { path = "../cotton-tools" }# The importer's vault key lives in the login Keychain (src/vault.rs).[target.'cfg(target_os = "macos")'.dependencies]security-framework = "3"