cosmos-rust icon indicating copy to clipboard operation
cosmos-rust copied to clipboard

bytes feature flag for proto?

Open gluax opened this issue 9 months ago • 1 comments

Hi hi, was wondering if the functionality could be added to support using the Bytes type in place of Vec<u8>. There's an option for this using neoeinstein-prost.

Might have to add some logic to the build.rs to support it being a cfg though.

gluax avatar Mar 02 '25 18:03 gluax

We check in the generated Rust code (because, among other reasons, the generated code contains ambiguous type names due to the source protos which needs modification to even compile), so this would need to be a change that is made to the public API.

If we do it, it would probably only make sense to do it consistently across all of the crates in the ecosystem which use generated protos, including tendermint-proto and ibc-proto.

So the right place to start is probably with tendermint-proto: https://github.com/tendermint/tendermint/blob/main/proto/README.md

tony-iqlusion avatar Mar 03 '25 13:03 tony-iqlusion