diff options
Diffstat (limited to 'plugin_proto/build.rs')
-rw-r--r-- | plugin_proto/build.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/plugin_proto/build.rs b/plugin_proto/build.rs deleted file mode 100644 index d2ef8c9..0000000 --- a/plugin_proto/build.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2017 The Chromium OS Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -extern crate protoc_rust; - -use std::env; -use std::fs; -use std::io::Write; -use std::path::PathBuf; - -fn main() { - let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); - - protoc_rust::run(protoc_rust::Args { - out_dir: out_dir.as_os_str().to_str().unwrap(), - input: &["protos/plugin.proto"], - includes: &["protos"], - ..Default::default() - }) - .expect("protoc"); - - let mut mod_out = fs::File::create(out_dir.join("proto_include.rs")).unwrap(); - writeln!( - mod_out, - "#[path = \"{}\"] pub mod plugin_proto;\npub use plugin_proto::*;", - out_dir.join("plugin.rs").display() - ) - .unwrap(); -} |