Crates.io | rust-abci |
lib.rs | rust-abci |
version | 0.1.0 |
source | src |
created_at | 2017-06-19 13:24:27.529779 |
updated_at | 2017-06-19 13:24:27.529779 |
description | An implementation of the ABCI protocol used by Tendermint Core. Allows the building of ABCI apps in Rust. |
homepage | https://tendermint.com/docs/guides/app-development |
repository | https://github.com/tendermint/rust-abci |
max_upload_size | |
id | 19526 |
size | 355,027 |
A rust implementation of the ABCI protocol for Tendermint.
We have a friendly community of like-minded people which are always eager to help someone in need of advice or just looking for casual banter.
Please read, understand and adhere to our code of conduct.
This library implements the ABCI protocol and can be used to write ABCI applications for Tendermint in rust. Here you can find more information about Tendermint and ABCI application.
For a real life example of an ABCI application you can checkout Ethermint or Basecoin.
Make sure that you have Rust installed. The easiest way is to follow the instructions on rustup.
To test the examples, please clone this repository.
git clone git@github.com:tendermint/rust-abci.git
Please have a look at the dummy or counter app inside src/bin
to get a feeling for how this server works.
To use this library to build your own ABCI apps in rust you have to include the following in your Cargo.toml
file.
[dependencies]
rust-abci = { git = "git@github.com:tendermint/rust-abci.git" }
To run either of the example apps you have to have Tendermint installed and initialised. Please install it according to these instructions. You can also check out Ethermint for an in-depth explanation of how ABCI apps work.
Rememeber to run tendermint with the --abci grpc
flag like so.
tendermint node --abci grpc
Once the Tendermint instance is up and running you can start either of the examples like this. Of course, please rememeber to switch into the rust-abci folder.
cargo run --features "grpc_support" --bin dummy
cargo run --features "grpc_support" --bin counter
// TODO - publish to rust docs
// TODO - give quick examples
The message types for the ABCI protocol are defined in a protobuf file, which can be copied from here.
We use rust-protobuf to generate compatible rust files from the protobuf source files. For convenience the generated rust files are checked into git and will be packaged with the library. If you want to generate them yourself you can. Install these two tools.
cargo install protobuf
cargo install grpc-compiler
protoc --rust_out src/ types.proto
protoc --rust-grpc_out src/ types.proto