-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support cosmos-sdk-proto
without transport
feature of tonic
#226
Comments
I think the main reason for this is the use of git submodules to pull proto files. If we generate code for It is a bit difficult to do in current design because code for The right solution should be to include |
The downside of this (beyond longer build times) is protoc must be installed to compile the crate
Even if we did move to a build.rs-based approach, we would still need to vendor the proto files into the crate somehow, similar to how the generated code is currently vendored, and that requires a source of truth for the protos, which is currently a 3rd party git repository (i.e. cosmos-sdk) Whether or not we use a git submodule to do that seems orthogonal, but also, given that requirement I'm not sure what approach would be better than a git submodule. |
Yes. We'll have to include
One approach is that instead of having a |
It does? That must be new. Does it compile protoc from source, and if so, does that require an entire C++ toolchain must be present? If so, that still seems bad.
That sounds exactly like what I just described. Note that this approach does not get rid of the git submodule which is the source of truth for the protos. It just replaces copying the generated Rust code with copying the protos. |
Here's what the https://github.com/tokio-rs/prost/blob/master/prost-build/README.md
...so there is a |
Closes #226 Adds an on-by-default `grpc-transport` feature which enables the corresponding `transport` feature in `tonic`. To make this work with generated code, the generated protos are patched to feature-gate the `tonic::transport`-dependent code.
I opened a PR to add a We can potentially investigate moving to a build.rs-based approach, but I think that's a bigger decision than just this feature, and it wasn't too difficult to add on top of the pre-generated code. |
Closes #226 Adds an on-by-default `grpc-transport` feature which enables the corresponding `transport` feature in `tonic`. To make this work with generated code, the generated protos are patched to feature-gate the `tonic::transport`-dependent code.
To call gRPC methods from browsers with
grpc-web
using webassembly, we need to disabletransport
feature oftonic
which is not currently exposed incosmos-sdk-proto
.The text was updated successfully, but these errors were encountered: