Created
June 20, 2018 02:45
-
-
Save jamesray1/6bd12f74e047c73f04b986dd1f727efb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
James@DESKTOP-EL89DSR MINGW64 ~/jrl (pure-rust-protoc) | |
$ git diff master | |
diff --git a/floodsub/Cargo.toml b/floodsub/Cargo.toml | |
index 0d187c7..02d5b17 100644 | |
--- a/floodsub/Cargo.toml | |
+++ b/floodsub/Cargo.toml | |
@@ -17,3 +17,7 @@ protobuf = "2" | |
smallvec = "0.6.0" | |
tokio-io = "0.1" | |
varint = { path = "../varint-rs" } | |
+ | |
+[build-dependencies] | |
+protobuf-codegen-pure = "2" | |
+ | |
diff --git a/floodsub/build.rs b/floodsub/build.rs | |
index dc63fab..59bc113 100644 | |
--- a/floodsub/build.rs | |
+++ b/floodsub/build.rs | |
@@ -1,9 +1,10 @@ | |
extern crate protobuf_codegen_pure; | |
-protobuf_codegen_pure::run(protobuf_codegen_pure::Args { | |
- out_dir: "src", | |
- input: "rpc.proto", | |
- customize: protobuf_codegen_pure::Customize { | |
- ..Default::default() | |
- }, | |
-}).expect("protoc"); | |
\ No newline at end of file | |
+fn main() { | |
+ protobuf_codegen_pure::run(protobuf_codegen_pure::Args { | |
+ out_dir: "src/protobuf_structs", | |
+ input: &["src/rpc.proto"], | |
+ includes: &["src"], | |
+ customize: Default::default(), | |
+ }).expect("protoc failed to run"); | |
+} | |
diff --git a/floodsub/src/lib.rs b/floodsub/src/lib.rs | |
index 49d6d4e..1f7b587 100644 | |
--- a/floodsub/src/lib.rs | |
+++ b/floodsub/src/lib.rs | |
@@ -33,6 +33,7 @@ extern crate smallvec; | |
extern crate tokio_io; | |
extern crate varint; | |
+#[path = "protobuf_structs/rpc.rs"] | |
mod rpc_proto; | |
mod topic; | |
diff --git a/floodsub/src/rpc_proto.rs b/floodsub/src/protobuf_structs/rpc.rs | |
similarity index 86% | |
rename from floodsub/src/rpc_proto.rs | |
rename to floodsub/src/protobuf_structs/rpc.rs | |
index a0557bb..b970324 100644 | |
--- a/floodsub/src/rpc_proto.rs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a partial output.