-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
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
prostproject? - 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 filesMetadata
Metadata
Assignees
Labels
No labels