5 releases
0.1.4 | Dec 7, 2022 |
---|---|
0.1.3 | Dec 7, 2022 |
0.1.2 | Dec 6, 2022 |
0.1.1 | Dec 5, 2022 |
0.1.0 | Dec 5, 2022 |
#85 in #tendermint
74KB
1.5K
SLoC
embedded-td
Embed tendermint into rust to use tendermint as a crate.
Usage
Add this line into Cargo.toml
:
embedded-td = "0.1"
Special tendermint version
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"] }
Build from source
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"] }
Custom upstream
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"
Features
You can use these features:
- Version of tendermint
td_ver_0_34
(default) tendermint 0.34td_ver_0_37
tendermint 0.37
- Runtime of async
smol-backend
(default).tokio-backend
- How to get tendermint?
use_source_code
Supported platfrom
- linux, amd64
- linux, arm64
- linux, armv6
- macos, amd64
- macos, arm64
- windows, amd64
- windows, arm64
- windows, armv6
- other target (only build from source)
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.
Test platform
- linux, x86_64
- windows, x86_64
- windows, aarch64
- android(termux), aarch64
Dependencies
~17–30MB
~401K SLoC