Files
tether/core/Cargo.toml
Patrick Ecord d1750a95d6 core: account-derived rooms — same account → same room everywhere
Add room_for_account(account) = sha256(account)[..4] hex, exported via UniFFI so
every client derives the IDENTICAL room from a shared identity. Clients now
default their room to the account-derived id (falling back to a device id only
when signed out). With the prefilled account, all our devices land in one room
across LAN, the relay, and RTC — so "just us" works cross-network, not only on
the same Wi-Fi. The single canonical Rust impl guarantees the ids match across
Swift/Kotlin/agent (a hand-rolled per-platform hash would risk drift).

Verified: agent and the live Mac app both derive room 360309c8 from
"pecord@gmail.com"; the Mac app publishes there on the public relay.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 01:55:28 -05:00

28 lines
850 B
TOML

[package]
name = "tethercore"
version = "0.1.0"
edition = "2021"
description = "Shared tether sync engine: codec + SSE client + reconnect, FFI-exported via UniFFI."
[lib]
# lib → examples/tests can link it natively
# staticlib → iOS .a / desktop agent
# cdylib → Android .so / bindgen library mode
crate-type = ["lib", "staticlib", "cdylib"]
name = "tethercore"
[[bin]]
name = "uniffi-bindgen"
path = "src/bin/uniffi-bindgen.rs"
[dependencies]
uniffi = { version = "0.28", features = ["cli"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "stream", "json"] }
tokio = { version = "1", features = ["rt-multi-thread", "time", "sync", "macros", "net", "io-util"] }
futures-util = "0.3"
webrtc = "0.17.1"
mdns-sd = "0.20.0"
sha2 = "0.11.0"