rust-abci

Crates.iorust-abci
lib.rsrust-abci
version0.1.0
sourcesrc
created_at2017-06-19 13:24:27.529779
updated_at2017-06-19 13:24:27.529779
descriptionAn implementation of the ABCI protocol used by Tendermint Core. Allows the building of ABCI apps in Rust.
homepagehttps://tendermint.com/docs/guides/app-development
repositoryhttps://github.com/tendermint/rust-abci
max_upload_size
id19526
size355,027
Adrian Brink (adrianbrink)

documentation

README

Rust ABCI

A rust implementation of the ABCI protocol for Tendermint.

Join the chat!

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.

Code of Conduct

Please read, understand and adhere to our code of conduct.


About rust-abci

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.


Dependencies

Make sure that you have Rust installed. The easiest way is to follow the instructions on rustup.

Installation

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" }

Running the examples

Tendermint

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

Examples

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

Documentation

// TODO - publish to rust docs

// TODO - give quick examples


Optional Dependencies

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
Commit count: 186

cargo fmt