cosmos-rust
cosmos-rust copied to clipboard
Enable cosmrs support `no_std`
Do you have an actual use case for cosmrs + no_std?
In particular it currently uses eyre for error handling, which does not support no_std.
It would be nice to wait for the stabilization of the Error trait in core before proceeding. I can't say I'm terribly happy with flex-error in tendermint-rs.
I am implement ics06-solomachain-client, that use cosmrs publickey type. I wish cosmrs can implement no-std.
Adding no_std support is something I don't have time to work on, and ideally it wouldn't require a bunch of compromises on the error types like what happened with tendermint-rs.
What no_std platform are you targeting?
Oh, there is no specific no-std platform support because I need to use types from cosmrs while implementing the ICS06 solomachine client. I don't think it makes sense to redundantly define which type conversions are needed in ibc-rs.
the error types like what happened with tendermint-rs.
Do you like how errors are handled in ibc-rs?
We have CosmWasm on Substrate. Substrate blockchain runtime (big contract) is no_std. We provide precompiles to CW contracts, so they can call our modules(called pallets) as if these are just usual contracts. One of precompiles is IBC Wasm Hook from Osmosis (allows IBC to terminate ICS 20 packets with contracts) calls. It requires generation and verification of sender and receiver using specific bech32 account encoding which needs some cosmos types for handling that.
Btw our no_std CW fork uses error in core feature.
Note: cosmos-sdk-proto support for no_std was added in #478
Rust 1.81 is out and core::error::Error is now stable, which should unblock this issue