v0.2.0
Full gRPC Streaming Support
This release adds complete streaming support, making grpc-php-rs a true drop-in replacement for the C-based ext/grpc extension. All four gRPC call types are now fully supported.
Streaming
- Server streaming —
ServerStreamingCallnow works correctly. A background tokio task drives the tonic response stream and communicates with PHP via channels, allowing multiplestartBatch([RECV_MESSAGE])calls to read messages one at a time. - Client streaming —
ClientStreamingCallsends multiple messages over a single HTTP/2 stream. EachstartBatch([SEND_MESSAGE])pushes through an mpsc channel to the tonic request stream. - Bidi streaming —
BidiStreamingCallsupports interleaved send and receive on the same stream. Both client and bidi streaming usetonic::client::Grpc::streaming()under the hood.
Bug Fixes
- Empty protobuf responses return
""instead ofnull— RPCs returning 0-byte messages (e.g.google.protobuf.Empty) now return an empty string, matching the C extension behavior. Fixes issues with Google Cloud PHP libraries like PubSub and Spanner. (thanks @dkkoma, #8)
Testing
- Added
CollectPayloads(client streaming) andBidiEcho(bidi streaming) RPCs to the test server - Added streaming tests covering all three streaming patterns
- Added empty response test
./test.sh allnow runs the full test suite: smoke, compat, grpc-gcp, streaming, and leak tests
New Contributors
Full Changelog: v0.1.9...v0.2.0