2016-01-12 23:10:57 +00:00
|
|
|
extern crate protobuf_build;
|
2015-05-09 10:07:24 +00:00
|
|
|
|
2016-01-12 23:10:57 +00:00
|
|
|
use std::env;
|
|
|
|
use std::path::PathBuf;
|
2015-05-09 10:07:24 +00:00
|
|
|
|
|
|
|
fn main() {
|
2016-01-12 23:10:57 +00:00
|
|
|
let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
|
|
|
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
|
2015-05-09 10:07:24 +00:00
|
|
|
let proto = root.join("proto");
|
2015-06-23 14:38:29 +00:00
|
|
|
|
2016-01-12 23:10:57 +00:00
|
|
|
let mut compiler = protobuf_build::Compiler::new(&proto, &out);
|
|
|
|
|
|
|
|
for file in &["keyexchange.proto",
|
|
|
|
"authentication.proto",
|
|
|
|
"mercury.proto",
|
|
|
|
"metadata.proto",
|
|
|
|
"pubsub.proto",
|
|
|
|
"spirc.proto"] {
|
|
|
|
compiler.compile(file).unwrap();
|
|
|
|
}
|
2015-05-09 10:07:24 +00:00
|
|
|
}
|
|
|
|
|