20 lines
447 B
Rust
20 lines
447 B
Rust
use std::{fs, io};
|
|
|
|
pub fn main() -> io::Result<()> {
|
|
let mut files = Vec::new();
|
|
|
|
for file in fs::read_dir("proto/steam")? {
|
|
let path = file?.path();
|
|
println!("cargo:rerun-if-changed={}", path.to_str().unwrap());
|
|
files.push(path);
|
|
}
|
|
|
|
protobuf_codegen::Codegen::new()
|
|
.includes(["proto/steam", "proto"])
|
|
.inputs(files)
|
|
.cargo_out_dir("gen")
|
|
.run_from_script();
|
|
|
|
Ok(())
|
|
}
|