extern crate protogen; use std::env; fn process_fn(input: &str) -> String { let header = "// This file was auto-generated by protogen and will be overwritten on every compile. Do not // hand-edit. Instead update the protogen source files in src/protogen. "; header.to_string() + input } fn main() { let mut path = env::current_dir().unwrap(); path.push("src"); path.push("protogen"); let mut output = env::current_dir().unwrap(); output.push("src"); output.push("protocol.rs"); protogen::process_dir_to(&path, &output, Some(&process_fn)).unwrap(); }