Skip to content
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

protobuf v4 codec and codegen #2206

Open
kriswuollett opened this issue Mar 5, 2025 · 0 comments
Open

protobuf v4 codec and codegen #2206

kriswuollett opened this issue Mar 5, 2025 · 0 comments

Comments

@kriswuollett
Copy link

Feature Request

Add protobuf v4 server code generation and server codec support.

Motivation

A beta version of the Google-assumed protobuf library seems to have been released (4.30.0-beta1). Assuming this will eventually provide semi-official Proto Text and JSON serialization support. See docs.

Given that the protobuf library wraps the C++ implementations, I'd lean towards assuming that any new gRPC Rust implementation will also wrap the C++ server given the battle-tested C++ proto messages stated reasonings. Or maybe it would be pure Rust, but based on another runtime like Cloudflare's Pingora. In any case, developers may wish to stick with tonic/hyper/tokio, but replace prost.

Caveats

  • Message generation will probably not be done under the prost project?
  • Have not tried to compile the protos myself personally (Ubuntu 22.04.5 LTS, x86_64):
$ sha256sum ~/tmp/bin/protoc 
1736d7bdcf94a2d96ed355c329b603f067dc70b3b7306431cedf5a3e5f2b91d8  /home/kris/tmp/bin/protoc
$ ~/tmp/bin/protoc --version
libprotoc 30.0
$ ~/tmp/bin/protoc --rust_out=./rust_out \
    --rust_opt=experimental-codegen=enabled \
    --rust_opt=kernel=cpp \
    -Iprotos protos/google/protobuf/source_context.proto
$ tree rust_out/
rust_out/
└── google
    └── protobuf
        ├── generated.rs
        ├── source_context.c.pb.rs
        └── source_context.pb.thunks.cc

3 directories, 3 files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant