Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 154 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 34 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ edition = "2021"
rust-version = "1.91.1"

[workspace]
members = [ "xtask" ]
members = ["xtask"]
resolver = "2"

[lib]
Expand All @@ -24,15 +24,32 @@ crate-type = ["cdylib", "rlib"]
default = ["sync", "bundled", "storage", "tls-webpki-roots"]

# Support for all sync solutions
sync = ["server-sync", "server-gcp", "server-aws", "server-local"]
sync = ["server-sync", "server-gcp", "server-aws", "server-local", "server-git"]
# Support for sync to a server
server-sync = ["encryption", "http"]
# Support for sync to GCP
server-gcp = ["cloud", "encryption", "http", "dep:google-cloud-storage", "dep:reqwest-middleware"]
server-gcp = [
"cloud",
"encryption",
"http",
"dep:google-cloud-storage",
"dep:reqwest-middleware",
]
# Support for sync to AWS
server-aws = ["cloud", "encryption", "http", "dep:aws-sdk-s3", "dep:aws-config", "dep:aws-credential-types", "dep:aws-smithy-runtime-api", "dep:aws-smithy-types"]
server-aws = [
"cloud",
"encryption",
"http",
"dep:aws-sdk-s3",
"dep:aws-config",
"dep:aws-credential-types",
"dep:aws-smithy-runtime-api",
"dep:aws-smithy-types",
]
# Suppport for sync to another SQLite database on the same machine
server-local = ["dep:rusqlite"]
# Support for sync via Git
server-git = ["git-sync"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the two levels of features here? I think one would be sufficient. The cloud syncs have cloud because it enables some common functionality, but there's no such thing for git. So,

server-git = ["dep:serde_with", "dep:glob", "encryption"]

and update the cfg(feature..) in the code.


# Support for all task storage backends (except indexeddb, which only works on WASM builds)
storage = ["storage-sqlite"]
Expand All @@ -45,6 +62,8 @@ storage-indexeddb = ["dep:idb", "dep:web-sys"]
encryption = ["dep:ring"]
# (private) Generic support for cloud sync
cloud = []
# (private) Support for Git based sync
git-sync = ["dep:serde_with", "dep:glob", "encryption"]
# static bundling of dependencies
bundled = ["rusqlite/bundled"]
# use CA roots built into the library for all HTTPS access
Expand All @@ -64,12 +83,13 @@ async-trait = "0.1.89"
byteorder = "1.5"
chrono = { version = "^0.4.44", features = ["serde"] }
flate2 = "1"
serde_with = { version = "3.18.0", features = ["base64"], optional = true }
idb = { version = "0.6.4", optional = true }
log = "^0.4.17"
# Reqwest is "stuck" at 0.12 because that's what google-cloud-storage depends on.
reqwest = { version = "0.12", default-features = false, optional = true }
ring = { version = "0.17", optional = true }
rusqlite = { version = "0.39", features = [ "fallible_uint" ], optional = true}
rusqlite = { version = "0.39", features = ["fallible_uint"], optional = true }
serde_json = "^1.0"
serde = { version = "^1.0.147", features = ["derive"] }
strum = "0.28"
Expand All @@ -78,11 +98,14 @@ tokio = { version = "1", features = ["macros", "sync", "rt"] }
thiserror = "2.0"
uuid = { version = "^1.23.0", features = ["serde", "v4"] }
url = { version = "2", optional = true }
glob = { version = "0.3.3", optional = true }

## wasm-only dependencies.
[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1", features = ["js"] }
ring = { version = "0", optional = true, features = ["wasm32_unknown_unknown_js"] }
ring = { version = "0", optional = true, features = [
"wasm32_unknown_unknown_js",
] }
getrandom = { version = "0.4", features = ["wasm_js"] }
wasm-bindgen = { version = "0.2" }
wasm-bindgen-futures = { version = "0.4" }
Expand All @@ -101,7 +124,7 @@ web-sys = { version = "0.3.83", optional = true, features = [
"EventTarget",
"Event",
"console",
]}
] }

## non-wasm dependencies
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand All @@ -110,7 +133,10 @@ aws-config = { version = "1.8", default-features = false, features = ["rt-tokio"
aws-credential-types = { version = "1", default-features = false, features = ["hardcoded-credentials"], optional = true }
aws-smithy-runtime-api = { version = "1.11", default-features = false, optional = true }
aws-smithy-types = { version = "1.4", default-features = false, optional = true }
google-cloud-storage = { version = "0.24.0", default-features = false, features = ["rustls-tls", "auth"], optional = true }
google-cloud-storage = { version = "0.24.0", default-features = false, features = [
"rustls-tls",
"auth",
], optional = true }
reqwest-middleware = { version = "0.4", optional = true }

## common dev-dependencies
Expand Down
Loading
Loading