informalsystems / tendermint-rs

Client libraries for Tendermint/CometBFT in Rust!
Apache License 2.0
609 stars 224 forks source link

no_std compatibility #824

Open romac opened 3 years ago

romac commented 3 years ago

This issue tracks the current status of no_std compatibility for the tendermint and ibc crates.

Dependency on std

Code-level dependencies on std items, like Box, collections, Error, file systems operations, etc.

These dependencies should be categorized depending on whether they are provided by the alloc crate or not. Only items provided by alloc can be used in no_std context, given that a global allocator is available.

TODO: Look more closely into no-std-compat.

tendermint

Pervasive, to be detailed further.

ibc

Pervasive, to be detailed further.

Dependencies

no_std compatibility of our dependencies, via manual inspection (could not get cargo-nono to work.

tendermint + ibc

no_std by default

no_std via feature

incompatible

ibc

no_std by default

no_std via feature

std-only

andynog commented 3 years ago

the ibc-rs dependency on bech32 will be removed when some refactoring happens as part of ibc-rs issue informalsystems/ibc-rs-tmp#88

zmanian commented 3 years ago

We have alloc only bech32 implementation that can be used in subtle-encoding

https://crates.io/crates/subtle-encoding

DaviRain-Su commented 3 years ago

when I move std to no_std, I replace anomaly to anyhow, thiserror to displaydoc, and use sp-std. but re-code after I meet time mod error, time mod is not support no_std. This Link: https://github.com/informalsystems/tendermint-rs/issues/884