Crates.io | embedded-td |
lib.rs | embedded-td |
version | 0.1.4 |
source | src |
created_at | 2022-12-05 15:40:22.382105 |
updated_at | 2022-12-07 17:18:12.715496 |
description | Running tendermint as rust crate |
homepage | |
repository | |
max_upload_size | |
id | 730433 |
size | 128,016 |
Embed tendermint into rust to use tendermint as a crate.
Add this line into Cargo.toml
:
embedded-td = "0.1"
Default tendermint version is 0.34
.
You can use feature to use different tendermint version.
embedded-td = { version = "0.1", features = ["td_ver_0_34"] }
By deafult, this crate use precompile version on github.
If you want to build from source, use use_source_code
:
embedded-td = { version = "0.1", features = ["use_source_code"] }
This feature can work with version.
embedded-td = { version = "0.1", features = ["use_source_code", "td_ver_0_34"] }
Note: Build from source need go
installed.
Building from source can also use non-goleveldb backends:
# Use cleveldb, please install `libleveldb`.
embedded-td = { version = "0.1", features = ["use_source_code", "backend_cleveldb"] }
# Use rocksdb, please install `librocksdb`.
embedded-td = { version = "0.1", features = ["use_source_code", "backend_rocksdb"] }
If you fork tendermint, use environment EMBEDDED_TD_UPSTREAM_URL
as custom upstream's url.
For example:
# source code url, format is .tar.gz
EMBEDDED_TD_UPSTREAM_URL = "http://example.com/tendermint"
You can use these features:
td_ver_0_34
(default) tendermint 0.34td_ver_0_37
tendermint 0.37smol-backend
(default).tokio-backend
use_source_code
1 ~ 8 can work with precompile binary. Beacuse origin tendermin repo only provide these release. If you want to running on other platform, please configure go cross compile.