Your one-stop-shop for all the compiled Rust protos used by Althea and Gravity Bridge.
This project was heavily inspired by github.com/cosmos/cosmos-rust, in particular the proto-build folder.
Download and install the latest protoc release on your machine. The common protos need not be moved to /usr/local/include/google
becuase they have been included in the common_proto
folder in this repo. If you have trouble with google related protos consider updating the common_proto
folder in this repo.
Once protoc has been setup simply cd proto_build ; cargo run
The resulting protos will need a little hand cleaning and version fixing as noted in the lib.rs
files of each crate.
The following folders receive the compiled Rust code generated by tonic-build and prost-build:
althea_proto: https://crates.io/crates/althea_proto
cosmos_sdk_proto: https://crates.io/crates/cosmos_sdk_proto_althea
gravity_proto: https://crates.io/crates/gravity_proto
The following folders are used as a source for protobuf files, using a special git submodule checkout configuration to avoid needless source code duplication (see Adding a new dependency).
althea-chain: https://github.com/althea-net/althea-chain
bech32-ibc: https://github.com/althea-net/bech32-ibc
cosmos-sdk: https://github.com/cosmos/cosmos-sdk
gravity: https://github.com/gravity-bridge/gravity-bridge
With git it is possible to check out only certain branches and directories from another git repository.
- git clone --depth=1 --no-checkout https://github.com/org/repo.git ./repo
- cd repo && git checkout commit-ish && cd ..
- git submodule add https://github.com/org/repo.git ./repo
- git submodule absorbgitdirs
- git -C repo config core.sparseCheckout true
echo 'folder-to-include/*' >> .git/modules/repo/info/sparse-checkout
- git submodule update --force --checkout repo
With a desired tag, branch, or commit hash run the following
- cd dependency
- git fetch origin <tag, branch, hash>
- git checkout <tag, branch, hash>