引入新的配置项

This commit is contained in:
2026-02-03 22:19:47 +08:00
parent 55c1e49142
commit 54b86a44e1
6 changed files with 287 additions and 17 deletions

View File

@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
use std::str::FromStr;
fn main() {
cxx_build::bridges(["src/lib.rs", "src/config.rs"])
cxx_build::bridges(["src/lib.rs", "src/config.rs", "src/login.rs"])
.std("c++20")
.compile("dnf_utils");
println!("cargo:rerun-if-changed=src/lib.rs");
@@ -29,7 +29,8 @@ fn main() {
prost_build::Config::new()
.out_dir(out_dir)
.compile_protos(&proto_list, &["proto/".to_string()]).unwrap();
.compile_protos(&proto_list, &["proto/".to_string()])
.unwrap();
//tonic_prost_build::configure()
// .out_dir(out_dir)
@@ -51,7 +52,6 @@ fn main() {
).unwrap();
}
fn get_filenames(dir: &str) -> Result<Vec<String>, std::io::Error> {
println!("cargo:rerun-if-changed=proto");
let entries = fs::read_dir(Path::new(dir))?;
@@ -66,4 +66,4 @@ fn get_filenames(dir: &str) -> Result<Vec<String>, std::io::Error> {
})
.collect();
Ok(filenames)
}
}