Skip to main content

vgi_rpc/
lib.rs

1//! vgi-rpc — transport-agnostic RPC framework built on Apache Arrow IPC.
2//!
3//! This crate provides a server-side implementation compatible with the
4//! Python `vgi_rpc` canonical wire protocol. Clients (pipe/subprocess/unix/http)
5//! supplied by other languages can drive a [`RpcServer`] transparently.
6
7pub mod access_log;
8pub mod arrow_type;
9pub mod auth;
10#[cfg(feature = "http")]
11pub mod crypto;
12pub mod errors;
13pub mod retry;
14
15#[cfg(feature = "external")]
16pub mod external;
17
18#[cfg(feature = "otel")]
19pub mod otel;
20
21pub mod hooks;
22pub mod introspect;
23pub mod log;
24pub mod metadata;
25#[cfg(feature = "sentry-sdk")]
26pub mod sentry_sdk;
27#[cfg(feature = "sentry-tracing")]
28pub mod sentry_tracing;
29pub mod server;
30#[cfg(feature = "shm")]
31pub mod shm;
32pub mod stream;
33#[cfg(feature = "http")]
34pub mod stream_codec;
35pub mod transport;
36pub mod transport_options;
37#[cfg(unix)]
38pub mod unix;
39pub(crate) mod util;
40pub mod wire;
41
42#[cfg(feature = "http")]
43pub mod http;
44#[cfg(feature = "http")]
45pub mod sticky;
46
47pub use access_log::AccessLogHook;
48pub use arrow_type::{
49    Bytes, Decimal20_4, DictString, FixedBinary, LargeBytes, LargeString, UtcTimestamp, VgiArrow,
50};
51
52pub use auth::oauth::OAuthResourceMetadata;
53pub use auth::{chain_all, chain_authenticate, AuthContext, AuthRequest, AuthResult, Authenticate};
54pub use errors::{Result, RpcError};
55pub use hooks::{CallStatistics, ChainHook, DispatchHook, DispatchInfo, HookToken, SharedHook};
56pub use introspect::{DESCRIBE_METHOD_NAME, DESCRIBE_VERSION};
57pub use log::{LogLevel, LogMessage};
58pub use retry::RetryConfig;
59pub use server::{
60    CallContext, MethodInfo, MethodType, Request, RpcServer, RpcServerBuilder, StickySink,
61};
62#[cfg(feature = "http")]
63pub use sticky::{DrainHandle, SessionRegistry};
64pub use stream::{ExchangeState, OutputCollector, ProducerState, StreamResult};
65pub use transport::{ServeStartHook, TransportCapabilities, TransportKind};
66
67#[cfg(feature = "otel")]
68pub use otel::{OtelConfig, OtelHook, OtelMetrics};
69#[cfg(feature = "sentry-sdk")]
70pub use sentry_sdk::{SentrySdkConfig, SentrySdkHook};
71#[cfg(feature = "sentry-tracing")]
72pub use sentry_tracing::{TracingSentryConfig, TracingSentryHook};
73
74#[cfg(feature = "macros")]
75pub use vgi_rpc_macros::{exchange, param, producer, service, unary, StreamState, VgiArrow};