cosmos / ibc-proto-rs

Rust Protobuf definitions and gRPC clients for interacting with Cosmos SDK, IBC and Interchain Security
Apache License 2.0
46 stars 29 forks source link

Make `transport` optional (potential WASM support) #237

Closed dakom closed 1 week ago

dakom commented 2 weeks ago

I believe this should be two steps:

  1. Feature-gating a bit more granularly

default could remain as-is. Would be something like a change from this:

[features]
default = ["std", "client"]
client = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost"]
server = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost"]

to this:

[features]
default = ["std", "client", "transport"]
client = ["std", "dep:tonic", "tonic/codegen", "tonic/prost"]
server = ["std", "dep:tonic", "tonic/codegen", "tonic/prost"]
transport = ["tonic/transport"]
  1. providing a way to tonic_build without the transport feature. I'm not sure if that's part of the proto-compiler tool

This comment looks relevant: https://github.com/hyperium/tonic/issues/1538#issuecomment-2049778792

I'd be happy to make a PR, since I was able to build a client partially with the feature-gating locally, but couldn't proceed with the proto-compiler tool (instructions don't work, or I did something wrong, it requires having a --ics and --nft param)

dakom commented 2 weeks ago

couldn't proceed with the proto-compiler tool

ah, missed the warning to run via scripts/sync-protobuf.sh, that works :)