Skip to main content

grpc/
lib.rs

1//! Synchronous gRPC channels, service dispatch and caller-thread streaming.
2//!
3//! Sessions own HTTP/2 protocol state; transports supply blocking readiness and
4//! codecs encode individual messages. No executor or background thread is created.
5
6pub mod channel;
7pub mod server;
8pub mod stream;
9
10pub use channel::{CallOptions, ChannelConfig, ChannelStreamDriver, SyncChannel};
11#[cfg(feature = "capnp")]
12pub use grpc_codec_capnp::CapnpCodec;
13#[cfg(feature = "fory")]
14pub use grpc_codec_fory::ForyCodec;
15#[cfg(feature = "protobuf")]
16pub use grpc_codec_prost::ProstCodec;
17/// Codec-independent request, response, session and transport contracts.
18pub use grpc_core as core;
19pub use grpc_core::{
20    Codec, CompressionAlgorithm, Metadata, MethodDescriptor, Request, Response, RpcCardinality,
21    SessionConfig, Status, Timeout,
22};
23/// Service-definition procedural macro namespace.
24pub use grpc_macros as macros;
25pub use server::{ServerStreamDriver, ServiceHandler, SyncServer};
26pub use stream::{
27    BidiStreamingCall, ClientStreamingCall, RequestStream, ResponseSink, ServerStreamingCall,
28    StreamDriver, StreamError, server_streams,
29};