2024-03-29 06:46:31 +00:00
|
|
|
pub fn main() {
|
|
|
|
let proto_file = "StarRail.proto";
|
|
|
|
if std::path::Path::new(proto_file).exists() {
|
|
|
|
println!("cargo:rerun-if-changed={proto_file}");
|
|
|
|
|
|
|
|
prost_build::Config::new()
|
|
|
|
.out_dir("out/")
|
2024-03-29 12:16:29 +00:00
|
|
|
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
|
2024-03-29 06:46:31 +00:00
|
|
|
.compile_protos(&[proto_file], &["."])
|
|
|
|
.unwrap();
|
|
|
|
}
|
|
|
|
}
|