about summary refs log tree commit diff
path: root/tvix/castore/Cargo.toml
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-03-19T09·46+0200
committerclbot <clbot@tvl.fyi>2024-03-20T12·17+0000
commit2798803f76687bdeceb10cdaf31ef3013d30acbc (patch)
treeb7a1bb37cbc7e3d35997a8183bb48c0f317a672c /tvix/castore/Cargo.toml
parent591edf0d5b5e4910f0a4688028348e423d723253 (diff)
refactor(tvix/castore): introduce "cloud" feature flag r/7749
This controls whether tvix-castore has support for various cloud
backends or not.

Use this to control the set of feature flags for the object_store
backend, and only enable the aws, azure and gcp ones if it's set.
In the future this can be used to enable/disable other cloud backends
too.

Without feature flags, `object_store` already supports the `InMemory`
and `LocalFilesystem` backends, and we also want to unconditionally
enable the `http` one. Make sure at least the construction of these
services is covered in the tests.

Similarly, the tvix-store crate, which provides the tvix-store CLI has a
`cloud` feature flag too (defaulting to enabled).

Change-Id: I9fb9c87b740e7dc83f8ff7a0862905d036d513f2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11204
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore/Cargo.toml')
-rw-r--r--tvix/castore/Cargo.toml7
1 files changed, 6 insertions, 1 deletions
diff --git a/tvix/castore/Cargo.toml b/tvix/castore/Cargo.toml
index 69834ed2e3b4..0a8b9b415773 100644
--- a/tvix/castore/Cargo.toml
+++ b/tvix/castore/Cargo.toml
@@ -14,7 +14,7 @@ digest = "0.10.7"
 fastcdc = { version = "3.1.0", features = ["tokio"] }
 futures = "0.3.30"
 lazy_static = "1.4.0"
-object_store = { version = "0.9.1", features = ["aws", "azure", "gcp", "http"] }
+object_store = { version = "0.9.1", features = ["http"] }
 parking_lot = "0.12.1"
 pin-project-lite = "0.2.13"
 prost = "0.12.1"
@@ -78,6 +78,11 @@ hex-literal = "0.4.1"
 
 [features]
 default = []
+cloud = [
+  "object_store/aws",
+  "object_store/azure",
+  "object_store/gcp",
+]
 fs = ["dep:libc", "dep:fuse-backend-rs"]
 virtiofs = [
   "fs",