-
Notifications
You must be signed in to change notification settings - Fork 410
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
Compile protobuf messages to multiple languages #705
Comments
I hesitate on this a lot. As we have seen often with the rust, go, and js builds (which do exist) auto-generated code usually needs some flags/tuning for the particular client it will be embedded in, not just the language. We have the go bindings here, and js bindings integrated with cosmjs are in cosmjs-types. Is there a particular client lib you want embedded? The acceptance criteria for "works in all languages" is too vague. I would rather a concrete ask we can consider. |
I highly doubt the auto-generated code in Cosmos sdk will be useful for either the existing js client or the existing rust client |
I do understand the motivation to have client code in one place and tight to the server version but this goes against loose coupling in system design and can easily become an unmaintainable epic. Instead the protobuf files define the api and abstraction layer that any client developer can use to build their own implementation. For JS for example cosmjs provides tools and additional helper packages to support client development in a much wider variate. |
Summary
Add a build script to generate
.proto
files into multiple language libraries. Build script can be executed through GitHub actions on each release tag and integrated to publish packages on repositories like maven, npm, etc.Problem Definition
Currently client developers are required to compile proto files into generated code into the language of their preference. This can be a cumbersome process for developers unfamiliar with the Protobuf code generation tools into different languages.
An easy way to reduce overhead on clients is to add a build script to take care of the code generation and publishing for common languages.
Proposal
Use Github actions to generate and publish different language packages on release tags. Github packages can be used to allow for publishing of packages.
The script should compile generated code into supported common languages:
The generated libraries should be published in public repositories so client developers can easily reference them as dependencies in their projects. There are PRs in place for Provenance.io and Cosmos to do this. It would be nice to add the same feature for wasmd.
The text was updated successfully, but these errors were encountered: