From 1a84e3e6d800fed1709364174d4a615b1d146ad0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 21 Jan 2023 14:18:51 +0100 Subject: chore(tvix/store): add fastcdc crate 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 --- tvix/Cargo.lock | 7 +++++++ tvix/Cargo.nix | 14 ++++++++++++++ tvix/store/Cargo.toml | 9 +++------ 3 files changed, 24 insertions(+), 6 deletions(-) (limited to 'tvix') diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock index 076d474742e1..6d52ffb9c192 100644 --- a/tvix/Cargo.lock +++ b/tvix/Cargo.lock @@ -616,6 +616,12 @@ dependencies = [ "str-buf", ] +[[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" @@ -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 f81af2a05884..c360f7293d1e 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 " + ]; + + }; "fastrand" = rec { crateName = "fastrand"; version = "1.8.0"; @@ -7362,6 +7372,10 @@ rec { name = "data-encoding"; 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 b306a11f44c0..151d985c82eb 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"] -- cgit 1.4.1