mirror of
https://github.com/spartanz51/tutabridge.git
synced 2026-06-24 10:54:32 +02:00
The CLI (`src/main.rs`) only spawned the syncer + IMAP + SMTP servers and never started an `EventBusClient` — so the realtime push the GUI's `BridgeHandle` ships had no effect when running `cargo run` or the headless binary. Mails that arrived after a bootstrap sync were silently missed until the next restart with a forced full re-sync; that's the irritant that triggered today's WS heartbeat/timeout audit. Replicate the bridge.rs initialisation directly: build an `EventBusClient`, hydrate `last_batch_ids` from `event_bus_state` (with the same 44-day expiration guard), spawn `bus_client.run` alongside the syncer and an `event_handler::run_event_handler` to consume the mpsc, and log WsState transitions at INFO so reconnect storms are visible without `RUST_LOG=debug`. Shutdown aborts the bus + handler handles in the same Ctrl-C arm as the syncer. To avoid duplicating the model-version + client-name plumbing, the helpers `bridge::sys_model_version`, `bridge::tutanota_model_version` and `bridge::CLIENT_NAME` are now public, and the root crate gains a direct `tuta-sdk` dependency (already present transitively through `tutabridge-core`).
21 lines
483 B
TOML
21 lines
483 B
TOML
[workspace]
|
|
members = ["crates/bridge", "src-tauri"]
|
|
exclude = ["tuta-repo"]
|
|
resolver = "2"
|
|
|
|
[package]
|
|
name = "tutabridge"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.84.0"
|
|
|
|
[dependencies]
|
|
tutabridge-core = { path = "crates/bridge" }
|
|
tuta-sdk = { path = "tuta-repo/tuta-sdk/rust/sdk", features = ["net"] }
|
|
tokio = { version = "1.43", features = ["full"] }
|
|
tokio-rustls = { version = "0.26", features = ["ring"] }
|
|
log = "0.4"
|
|
env_logger = "0.11"
|
|
anyhow = "1"
|
|
rpassword = "7"
|