From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Sun, 22 Feb 2026 08:31:52 +0100
Subject: Make remote sync optional

---
 Cargo.toml     | 10 ++++++++++
 src/replica.rs |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/Cargo.toml b/Cargo.toml
index ead38f0..949e322 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,6 +5,16 @@ edition = "2021"
 # This should match the MSRV of the `taskchampion` crate.
 rust-version = "1.81.0"
 
+[features]
+default = []
+
+# Support for all sync solutions
+sync = ["server-sync", "server-gcp"]
+# Support for sync to a server
+server-sync = []
+# Support for sync to GCP
+server-gcp = []
+
 [package.metadata.maturin]
 name = "taskchampion"
 
diff --git a/src/replica.rs b/src/replica.rs
index 18a2ab8..cf17683 100644
--- a/src/replica.rs
+++ b/src/replica.rs
@@ -137,6 +137,7 @@ impl Replica {
     }
 
     /// Sync with a server created from `ServerConfig::Remote`.
+    #[cfg(feature = "server-sync")]
     fn sync_to_remote(
         &mut self,
         url: String,
@@ -157,6 +158,7 @@ impl Replica {
     }
 
     /// Sync with a server created from `ServerConfig::Gcp`.
+    #[cfg(feature = "server-gcp")]
     #[pyo3(signature=(bucket, credential_path, encryption_secret, avoid_snapshots))]
     fn sync_to_gcp(
         &mut self,
