引入新的配置项
This commit is contained in:
8
build.rs
8
build.rs
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user