Build the Rust counterpart to `ely-browser-cloud`: a Bearer-token authenticated HTTP client with the JSON wire types for the worker's device + snapshot routes. What lands: - `BearerToken` + `BearerTokenStore` so Better Auth sessions persist per profile data dir with atomic rename writes. - `DeviceIdentity` (UUIDv7 + Ed25519-shaped public key, persisted alongside the token so the worker keeps the same `device_id` across restarts). - `SyncApiClient` with `register_device`, `list_devices`, `upload_snapshot`, and `download_snapshot` over `ureq`, mapping the worker's strict error envelopes onto typed `SyncClientError`s. - `SnapshotPayload` enforces the worker's 10 MiB / SHA-256-hash contract before the wire encode, so callers fail fast. Out of scope for this commit: the BrowserCore integration that swaps snapshots in and out, and the in-app Better Auth + device-approval UX. Those land in subsequent commits — `cloudflare/src/api_controls.ts` rejects sync from devices that aren't already approved, so first-use also requires a one-shot D1 approval until that path exists in the UI.
54 lines
1.2 KiB
TOML
54 lines
1.2 KiB
TOML
[workspace]
|
|
members = [
|
|
"crates/ely_app",
|
|
"crates/ely_browser_core",
|
|
"crates/ely_design_system",
|
|
"crates/ely_domain",
|
|
"crates/ely_servo_host",
|
|
"crates/ely_sync_client",
|
|
]
|
|
default-members = ["crates/ely_app"]
|
|
resolver = "2"
|
|
|
|
[workspace.package]
|
|
edition = "2024"
|
|
license = "Apache-2.0"
|
|
rust-version = "1.95"
|
|
|
|
[workspace.dependencies]
|
|
directories = "6.0.0"
|
|
dpi = "0.1"
|
|
ed25519-dalek = "2.2.0"
|
|
gpui = "0.2.2"
|
|
gpui-component = "0.5.1"
|
|
gpui-component-assets = "0.5.1"
|
|
image = "0.25.10"
|
|
servo = "0.1.0"
|
|
sha2 = "0.10.9"
|
|
semver = "1.0.28"
|
|
serde = { version = "1.0.228", features = ["derive"] }
|
|
serde_json = "1.0.145"
|
|
thiserror = "2.0.12"
|
|
toml = "1.1.2"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
ureq = "2.12.1"
|
|
url = "2.5.4"
|
|
uuid = { version = "1.12.1", features = ["v7"] }
|
|
|
|
[patch.crates-io]
|
|
# Local GPUI 0.2.2 patch: macOS `surface(CVPixelBuffer)` accepts Servo's BGRA IOSurfaces.
|
|
gpui = { path = "third_party/gpui" }
|
|
|
|
[workspace.lints.rust]
|
|
unsafe_code = "deny"
|
|
|
|
[workspace.lints.clippy]
|
|
dbg_macro = "deny"
|
|
todo = "deny"
|
|
unwrap_used = "deny"
|
|
expect_used = "deny"
|
|
panic = "deny"
|
|
large_futures = "warn"
|
|
large_stack_frames = "warn"
|