2025-10-18 00:00:04 -07:00
|
|
|
use pb_rs::ConfigBuilder;
|
|
|
|
|
use pb_rs::types::FileDescriptor;
|
2023-05-19 15:16:54 -07:00
|
|
|
|
2025-03-06 23:04:02 -08:00
|
|
|
use crate::codegen::gen_cxx_binding;
|
2023-06-20 14:29:09 -07:00
|
|
|
|
2025-03-06 23:04:02 -08:00
|
|
|
#[path = "../include/codegen.rs"]
|
|
|
|
|
mod codegen;
|
2023-05-19 15:16:54 -07:00
|
|
|
|
2025-12-08 17:35:52 -08:00
|
|
|
#[allow(clippy::unwrap_used)]
|
2023-05-03 16:13:05 -07:00
|
|
|
fn main() {
|
2023-06-21 00:22:48 +08:00
|
|
|
println!("cargo:rerun-if-changed=proto/update_metadata.proto");
|
2023-05-19 15:16:54 -07:00
|
|
|
|
|
|
|
|
gen_cxx_binding("boot-rs");
|
2023-06-21 00:22:48 +08:00
|
|
|
|
|
|
|
|
let cb = ConfigBuilder::new(
|
|
|
|
|
&["proto/update_metadata.proto"],
|
|
|
|
|
None,
|
|
|
|
|
Some(&"proto"),
|
|
|
|
|
&["."],
|
|
|
|
|
)
|
|
|
|
|
.unwrap();
|
|
|
|
|
FileDescriptor::run(
|
|
|
|
|
&cb.single_module(true)
|
|
|
|
|
.dont_use_cow(true)
|
|
|
|
|
.generate_getters(true)
|
|
|
|
|
.build(),
|
|
|
|
|
)
|
|
|
|
|
.unwrap();
|
2023-05-03 16:13:05 -07:00
|
|
|
}
|