diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-13 00:50:54 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-13 00:50:54 +0200 |
| commit | 6723829a3398b3c9dd6dc6ae79124f46000606ee (patch) | |
| tree | a1ec535eddd711a4557e4bcc5b94382c3623504c /crates/turtle/build.rs | |
| parent | chore(treewide): Cleanup themes (diff) | |
| download | atuin-6723829a3398b3c9dd6dc6ae79124f46000606ee.zip | |
chore(treewide): Remove `cargo` warnings to 0
There are still the `clippy` warnings, but they are for a future date.
Diffstat (limited to 'crates/turtle/build.rs')
| -rw-r--r-- | crates/turtle/build.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/crates/turtle/build.rs b/crates/turtle/build.rs index 5f26e26c..ad4bc3c8 100644 --- a/crates/turtle/build.rs +++ b/crates/turtle/build.rs @@ -1,6 +1,7 @@ use std::process::Command; use std::{env, fs, path::PathBuf}; +use protox::Compiler; use protox::prost::Message; fn main() -> Result<(), std::io::Error> { @@ -24,16 +25,24 @@ fn main() -> Result<(), std::io::Error> { ]; let proto_include_dirs = ["proto"]; - let file_descriptors = protox::compile(proto_paths, proto_include_dirs).unwrap(); + let file_descriptor_set = Compiler::new(proto_include_dirs) + .map_err(std::io::Error::other)? + .include_source_info(true) + .include_imports(true) + .open_files(proto_paths) + .map_err(std::io::Error::other)? + .file_descriptor_set(); let file_descriptor_path = PathBuf::from(env::var_os("OUT_DIR").expect("OUT_DIR not set")) .join("file_descriptor_set.bin"); - fs::write(&file_descriptor_path, file_descriptors.encode_to_vec()).unwrap(); + fs::write(&file_descriptor_path, file_descriptor_set.encode_to_vec()).unwrap(); tonic_prost_build::configure() .build_server(true) .file_descriptor_set_path(&file_descriptor_path) .skip_protoc_run() - .compile_protos(&proto_paths, &proto_include_dirs) + .compile_protos(&proto_paths, &proto_include_dirs)?; } + + Ok(()) } |
