-
Notifications
You must be signed in to change notification settings - Fork 939
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: Consolidate protobuf scripts and update to rust-protobuf 2.8.1 (#1275
) * *: Consolidate protobuf generation scripts * *: Update to rust-protobuf 2.8.1 * *: Mark protobuf generated modules with '_proto'
- Loading branch information
Showing
30 changed files
with
684 additions
and
608 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,3 @@ | ||
#!/bin/sh | ||
|
||
# This script regenerates the `src/structs_proto.rs` and `src/keys_proto.rs` files from | ||
# `structs.proto` and `keys.proto`. | ||
|
||
sudo docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \ | ||
apt-get update; \ | ||
apt-get install -y protobuf-compiler; \ | ||
cargo install --version 2.3.0 protobuf-codegen; \ | ||
protoc --rust_out . keys.proto" | ||
|
||
sudo chown $USER:$USER keys.rs | ||
mv -f keys.rs ./src/keys_proto.rs | ||
../scripts/protobuf/gen.sh src/keys.proto |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
syntax = "proto2"; | ||
|
||
enum KeyType { | ||
RSA = 0; | ||
Ed25519 = 1; | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,3 @@ | ||
#!/bin/sh | ||
|
||
# This script regenerates the `src/rpc_proto.rs` file from `rpc.proto`. | ||
|
||
docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \ | ||
apt-get update; \ | ||
apt-get install -y protobuf-compiler; \ | ||
cargo install --version 2.3.0 protobuf-codegen; \ | ||
protoc --rust_out . rpc.proto" | ||
|
||
sudo chown $USER:$USER *.rs | ||
|
||
mv -f rpc.rs ./src/rpc_proto.rs | ||
../../scripts/protobuf/gen.sh src/rpc.proto |
2 changes: 2 additions & 0 deletions
2
protocols/floodsub/rpc.proto → protocols/floodsub/src/rpc.proto
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
syntax = "proto2"; | ||
|
||
package floodsub.pb; | ||
|
||
message RPC { | ||
|
Oops, something went wrong.