about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-11-19T14·25+0200
committerflokli <flokli@flokli.de>2024-11-23T09·40+0000
commitdc21f5e5432e70ed2838df799077b22aa0c3ac6a (patch)
tree1c8e0417e5ac802312b696fc9474795fb21d03c3
parent923ed3532d72c2e1e0f4f5e5849f26ff6e503377 (diff)
feat(tvix/store): add xp-store-composition-cli feature flag r/8947
This can be used to transitively enable the `xp-composition-cli` feature
flag in the `tvix-store` crate, which is unnecessarily hard to do with
crate2nix.

Change-Id: I3f7c505a3fd505561c9a7b2f063b6540532cdfd4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12809
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
-rw-r--r--tvix/Cargo.nix6
-rw-r--r--tvix/cli/Cargo.toml1
-rw-r--r--tvix/docs/src/castore/store-configuration.md5
-rw-r--r--tvix/nar-bridge/Cargo.toml1
4 files changed, 10 insertions, 3 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix
index 857138412736..76249061f1c0 100644
--- a/tvix/Cargo.nix
+++ b/tvix/Cargo.nix
@@ -6982,8 +6982,9 @@ rec {
         features = {
           "default" = [ "otlp" ];
           "otlp" = [ "tvix-tracing/otlp" ];
+          "xp-store-composition-cli" = [ "tvix-store/xp-composition-cli" ];
         };
-        resolvedDefaultFeatures = [ "default" "otlp" ];
+        resolvedDefaultFeatures = [ "default" "otlp" "xp-store-composition-cli" ];
       };
       "nibble_vec" = rec {
         crateName = "nibble_vec";
@@ -15709,8 +15710,9 @@ rec {
         ];
         features = {
           "tracy" = [ "tvix-tracing/tracy" ];
+          "xp-store-composition-cli" = [ "tvix-store/xp-composition-cli" ];
         };
-        resolvedDefaultFeatures = [ "default" "tracy" ];
+        resolvedDefaultFeatures = [ "default" "tracy" "xp-store-composition-cli" ];
       };
       "tvix-eval" = rec {
         crateName = "tvix-eval";
diff --git a/tvix/cli/Cargo.toml b/tvix/cli/Cargo.toml
index d13cd17cbd0e..1d4507ce5073 100644
--- a/tvix/cli/Cargo.toml
+++ b/tvix/cli/Cargo.toml
@@ -34,3 +34,4 @@ expect-test = { workspace = true }
 [features]
 default = []
 tracy = ["tvix-tracing/tracy"]
+xp-store-composition-cli = ["tvix-store/xp-composition-cli"]
diff --git a/tvix/docs/src/castore/store-configuration.md b/tvix/docs/src/castore/store-configuration.md
index af476dd47922..91015e6b5586 100644
--- a/tvix/docs/src/castore/store-configuration.md
+++ b/tvix/docs/src/castore/store-configuration.md
@@ -54,7 +54,7 @@ today, using the existing CLI entrypoints, you can enable the
 
 With `cargo`, this can be enabled by passing
 `--features tvix-store/xp-composition-cli` to a `cargo build` / `cargo run`
-invocation.
+invocation. [^1]
 
 If enabled, CLI entrypoints get a `--experimental-store-composition` arg, which
 accepts a TOML file describing a composition for all three stores (causing the
@@ -171,3 +171,6 @@ public_keys = ["cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="]
 blob_service = "root"
 directory_service = "root"
 ```
+
+
+[^1]: In some leaf binary crates, this can also be controlled via the `xp-store-composition-cli` feature in the leaf crate itself.
diff --git a/tvix/nar-bridge/Cargo.toml b/tvix/nar-bridge/Cargo.toml
index ac23b597311f..79d65f77c1d3 100644
--- a/tvix/nar-bridge/Cargo.toml
+++ b/tvix/nar-bridge/Cargo.toml
@@ -39,6 +39,7 @@ tonic-build = { workspace = true }
 [features]
 default = ["otlp"]
 otlp = ["tvix-tracing/otlp"]
+xp-store-composition-cli = ["tvix-store/xp-composition-cli"]
 
 [dev-dependencies]
 hex-literal = { workspace = true }