JadeSR-fork/proto/build.rs

13 lines
368 B
Rust
Raw Normal View History

2024-05-09 13:23:01 +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/")
.enum_attribute(".", "#[derive(EnumString)]")
2024-05-09 13:23:01 +00:00
.compile_protos(&[proto_file], &["."])
.unwrap();
}
}