about summary refs log tree commit diff
path: root/tvix/Cargo.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2022-11-26T01·14+0000
committerflokli <flokli@flokli.de>2022-12-30T20·25+0000
commit0bf2b0ef1164aae0ad692066e8cfc0b243a89e4d (patch)
treeba915b00f113395c55cc8094dfdd0b020de579cc /tvix/Cargo.nix
parent51243007f67019d0d57b6cfaff2aec3191afa180 (diff)
feat(tvix/store): implement reflection r/5557
This implements grpc.reflection.v1alpha.ServerReflection, and will make tools
like evans automatically discover available services, without having to
specify the path to the .proto files client-side.

It's behind a reflection feature flag, which is enabled by default.

Change-Id: Icbcb5eb05ceede5b9952e38a2ba72eaa6fa8a437
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7435
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/Cargo.nix')
-rw-r--r--tvix/Cargo.nix62
1 files changed, 60 insertions, 2 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix
index 2487f8abff..225f0f04ad 100644
--- a/tvix/Cargo.nix
+++ b/tvix/Cargo.nix
@@ -3792,6 +3792,7 @@ rec {
           "default" = [ "std" ];
           "std" = [ "prost/std" ];
         };
+        resolvedDefaultFeatures = [ "default" "std" ];
       };
       "quick-error" = rec {
         crateName = "quick-error";
@@ -5501,7 +5502,7 @@ rec {
           "time" = [ "tokio/time" ];
           "tokio-util" = [ "dep:tokio-util" ];
         };
-        resolvedDefaultFeatures = [ "default" "time" ];
+        resolvedDefaultFeatures = [ "default" "net" "time" ];
       };
       "tokio-util" = rec {
         crateName = "tokio-util";
@@ -5770,6 +5771,53 @@ rec {
         };
         resolvedDefaultFeatures = [ "default" "prost" "prost-build" "transport" ];
       };
+      "tonic-reflection" = rec {
+        crateName = "tonic-reflection";
+        version = "0.5.0";
+        edition = "2018";
+        sha256 = "05i6c1fcbwkkj0p2r63vb5iac60b22a5rif3zx5li8a0slqgfm84";
+        authors = [
+          "James Nugent <james@jen20.com>"
+          "Samani G. Gikandi <samani@gojulas.com>"
+        ];
+        dependencies = [
+          {
+            name = "bytes";
+            packageId = "bytes";
+          }
+          {
+            name = "prost";
+            packageId = "prost";
+          }
+          {
+            name = "prost-types";
+            packageId = "prost-types";
+          }
+          {
+            name = "tokio";
+            packageId = "tokio";
+            features = [ "sync" ];
+          }
+          {
+            name = "tokio-stream";
+            packageId = "tokio-stream";
+            features = [ "net" ];
+          }
+          {
+            name = "tonic";
+            packageId = "tonic";
+            features = [ "codegen" "prost" ];
+          }
+        ];
+        buildDependencies = [
+          {
+            name = "tonic-build";
+            packageId = "tonic-build";
+            features = [ "transport" "prost" ];
+          }
+        ];
+
+      };
       "tower" = rec {
         crateName = "tower";
         version = "0.4.13";
@@ -6429,6 +6477,11 @@ rec {
             name = "tonic";
             packageId = "tonic";
           }
+          {
+            name = "tonic-reflection";
+            packageId = "tonic-reflection";
+            optional = true;
+          }
         ];
         buildDependencies = [
           {
@@ -6446,7 +6499,12 @@ rec {
             packageId = "test-case";
           }
         ];
-
+        features = {
+          "default" = [ "reflection" ];
+          "reflection" = [ "tonic-reflection" ];
+          "tonic-reflection" = [ "dep:tonic-reflection" ];
+        };
+        resolvedDefaultFeatures = [ "default" "reflection" "tonic-reflection" ];
       };
       "typenum" = rec {
         crateName = "typenum";