about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-01-21T13·18+0100
committerflokli <flokli@flokli.de>2023-01-21T15·12+0000
commit1a84e3e6d800fed1709364174d4a615b1d146ad0 (patch)
treee08cddc3d30c4796402ecc70c3c637b11f322f4c
parent4614db2f83b42f6026beee9fa60d36aabec2e3de (diff)
chore(tvix/store): add fastcdc crate r/5727
This is used for content-defined chunking.

Change-Id: I10345372cecb9a643cc51ca45aa5b77d2a05198a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7889
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
-rw-r--r--tvix/Cargo.lock7
-rw-r--r--tvix/Cargo.nix14
-rw-r--r--tvix/store/Cargo.toml9
3 files changed, 24 insertions, 6 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock
index 076d474742..6d52ffb9c1 100644
--- a/tvix/Cargo.lock
+++ b/tvix/Cargo.lock
@@ -617,6 +617,12 @@ dependencies = [
 ]
 
 [[package]]
+name = "fastcdc"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8093ae083a5098c6ac2e898350c704b2c70d092f9a5c0ad6f43703ec89a872b1"
+
+[[package]]
 name = "fastrand"
 version = "1.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2451,6 +2457,7 @@ dependencies = [
  "blake3",
  "clap 4.0.32",
  "data-encoding",
+ "fastcdc",
  "lazy_static",
  "prost",
  "prost-build",
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix
index f81af2a058..c360f7293d 100644
--- a/tvix/Cargo.nix
+++ b/tvix/Cargo.nix
@@ -1806,6 +1806,16 @@ rec {
         ];
         features = { };
       };
+      "fastcdc" = rec {
+        crateName = "fastcdc";
+        version = "2.0.0";
+        edition = "2018";
+        sha256 = "1cbjm24yq0rpykb0lp4s5w4hvixj0k3m10w95sncd62h784ax4w0";
+        authors = [
+          "Nathan Fiedler <nathanfiedler@fastmail.fm>"
+        ];
+
+      };
       "fastrand" = rec {
         crateName = "fastrand";
         version = "1.8.0";
@@ -7363,6 +7373,10 @@ rec {
             packageId = "data-encoding";
           }
           {
+            name = "fastcdc";
+            packageId = "fastcdc";
+          }
+          {
             name = "lazy_static";
             packageId = "lazy_static";
           }
diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml
index b306a11f44..151d985c82 100644
--- a/tvix/store/Cargo.toml
+++ b/tvix/store/Cargo.toml
@@ -20,6 +20,7 @@ tokio-stream = "0.1.11"
 tonic = "0.8.2"
 tracing-subscriber = "0.3.16"
 tracing = "0.1.37"
+fastcdc = "2.0.0"
 
 [dependencies.tonic-reflection]
 optional = true
@@ -35,9 +36,5 @@ tempfile = "3.3.0"
 tonic-mock = { git = "https://github.com/brainrake/tonic-mock", branch = "bump-dependencies" }
 
 [features]
-default = [
-  "reflection"
-]
-reflection = [
-  "tonic-reflection"
-]
+default = ["reflection"]
+reflection = ["tonic-reflection"]