diff options
Diffstat (limited to 'test_util/build.rs')
-rw-r--r-- | test_util/build.rs | 22 |
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(()) +} |