Giter Club home page Giter Club logo

althea-net-proto's Introduction

Proto

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.

Building the protos

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.

Compiled Rust Protos

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

Dependency folders

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

Adding a new dependency

With git it is possible to check out only certain branches and directories from another git repository.

  1. git clone --depth=1 --no-checkout https://github.com/org/repo.git ./repo
  2. cd repo && git checkout commit-ish && cd ..
  3. git submodule add https://github.com/org/repo.git ./repo
  4. git submodule absorbgitdirs
  5. git -C repo config core.sparseCheckout true
  6. echo 'folder-to-include/*' >> .git/modules/repo/info/sparse-checkout
  7. git submodule update --force --checkout repo

Updating a dependency to a new version

With a desired tag, branch, or commit hash run the following

  1. cd dependency
  2. git fetch origin <tag, branch, hash>
  3. git checkout <tag, branch, hash>

althea-net-proto's People

Contributors

christianborst avatar jkilpatr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.