extern crate bindgen; extern crate byteorder; extern crate crc16; extern crate protoc_rust_grpc; extern crate xml; mod parser; use std::env; use std::fs::File; use std::path::Path; use std::path::PathBuf; use std::process::Command; pub fn main() { let src_dir = env::current_dir().unwrap(); let in_path = Path::new(&src_dir).join("combined.xml"); let mut inf = File::open(&in_path).unwrap(); let out_dir = env::var("OUT_DIR").unwrap(); let dest_path = Path::new(&out_dir).join("common.rs"); let mut outf = File::create(&dest_path).unwrap(); parser::generate_mod(&mut inf, &mut outf); protoc_rust_grpc::run(protoc_rust_grpc::Args { out_dir: "src", includes: &["src/protos/"], input: &[ "src/protos/pathplanner/path.proto", "src/protos/interop/obstacles.proto", "src/protos/interop/mission.proto", ], rust_protobuf: true, }).expect("protoc-rust-grpc"); }