summaryrefslogtreecommitdiff
path: root/test_util/build.rs
diff options
context:
space:
mode:
authorHeyang Zhou <zhy20000919@hotmail.com>2023-08-22 13:56:00 +0800
committerGitHub <noreply@github.com>2023-08-22 13:56:00 +0800
commit6d4a005e4108a5dd762b339a02bc4d802755ba0d (patch)
tree69679038bfbd3127f6c1e1b85dbc347c8c52e36e /test_util/build.rs
parent5834d282d4de5d0b5cacb9bf068f3896bef0a48a (diff)
feat(ext/kv): connect to remote database (#20178)
This patch adds a `remote` backend for `ext/kv`. This supports connection to Deno Deploy and potentially other services compatible with the KV Connect protocol.
Diffstat (limited to 'test_util/build.rs')
-rw-r--r--test_util/build.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/test_util/build.rs b/test_util/build.rs
new file mode 100644
index 000000000..420abd0a1
--- /dev/null
+++ b/test_util/build.rs
@@ -0,0 +1,22 @@
+// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
+
+use std::env;
+use std::io;
+use std::path::PathBuf;
+
+fn main() -> io::Result<()> {
+ println!("cargo:rerun-if-changed=../ext/kv/proto");
+
+ let descriptor_path =
+ PathBuf::from(env::var("OUT_DIR").unwrap()).join("proto_descriptor.bin");
+
+ prost_build::Config::new()
+ .file_descriptor_set_path(&descriptor_path)
+ .compile_well_known_types()
+ .compile_protos(
+ &["../ext/kv/proto/datapath.proto"],
+ &["../ext/kv/proto/"],
+ )?;
+
+ Ok(())
+}