diff options
| author | Heyang Zhou <zhy20000919@hotmail.com> | 2023-08-22 13:56:00 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-22 13:56:00 +0800 |
| commit | 6d4a005e4108a5dd762b339a02bc4d802755ba0d (patch) | |
| tree | 69679038bfbd3127f6c1e1b85dbc347c8c52e36e /ext/kv/build.rs | |
| parent | 5834d282d4de5d0b5cacb9bf068f3896bef0a48a (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 'ext/kv/build.rs')
| -rw-r--r-- | ext/kv/build.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/kv/build.rs b/ext/kv/build.rs new file mode 100644 index 000000000..eba8a20f7 --- /dev/null +++ b/ext/kv/build.rs @@ -0,0 +1,19 @@ +// 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=./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(&["proto/datapath.proto"], &["proto/"])?; + + Ok(()) +} |
