mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
3c29d744a9
Removes external dependency on rust-protobuf, which prevents version mismatch between the runtime and the compiler.
22 lines
588 B
Rust
22 lines
588 B
Rust
extern crate protobuf_build;
|
|
|
|
use std::env;
|
|
use std::path::PathBuf;
|
|
|
|
fn main() {
|
|
let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
|
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
let proto = root.join("proto");
|
|
|
|
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();
|
|
}
|
|
}
|
|
|