tsp

Crates.iotsp
lib.rstsp
version0.2.3
sourcesrc
created_at2017-08-22 08:41:21.613085
updated_at2017-08-22 08:45:33.268109
descriptionAn implementation of the TSP protocol used by Tendermint Core. Allows the building of COSMOS apps in Rust.
homepagehttps://tendermint.com/docs/guides/app-development
repositoryhttps://github.com/tendermint/rust-tsp
max_upload_size
id28533
size292,816
Adrian Brink (adrianbrink)

documentation

https://docs.rs/tsp/0.2.3/tsp/

README

Rust ABCI

A rust implementation of the ABCI protocol for Tendermint.

Build Status

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 = "0.1.0"

Or if you want to live on the edge then point directly towards our git repo.

[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