Skip to main content

Crate thunder

Crate thunder 

Source
Expand description

HiveLLM binary RPC — one crate for the whole Rust stack.

Thunder ships as a single publishable crate with three feature-gated layers, so a product depends on thunder once instead of tracking thunder-wire / thunder-client / thunder-server as separate releases:

  • wire — the frozen wire v1 codec (value model, Request/Response, length-prefixed MessagePack frames). Always compiled; pure, no sockets (SPEC-001, WIRE-xxx).
  • client — the multiplexed, profile-driven RPC client (SPEC-003, CLT-xxx). Feature client (default on).
  • server — the family server hot path: accept loop, dispatch trait, profile enforcement (SPEC-004, SRV-xxx). Feature server (default on).

Both client and server are on by default. A client-only SDK builds with default-features = false, features = ["client"]; a server binary with ["server"]. The wire layer alone is default-features = false.

The most-used items are re-exported at the crate root; the full surface of each layer lives under its module. client::Credentials and server::Credentials are distinct types and are reached through their modules (they are deliberately not re-exported at the root).

Re-exports§

pub use wire::decode_frame;
pub use wire::decode_frame_with_limit;
pub use wire::encode_frame;
pub use wire::Config;
pub use wire::DecodeError;
pub use wire::Request;
pub use wire::Response;
pub use wire::Value;
pub use wire::DEFAULT_MAX_FRAME_BYTES;
pub use wire::PUSH_ID;
pub use client::parse_endpoint;
pub use client::Client;
pub use client::ClientConfig;
pub use client::ClientError;
pub use client::Endpoint;
pub use client::HandshakeInfo;
pub use server::format_bracket_code;
pub use server::format_err;
pub use server::spawn_listener;
pub use server::AuthError;
pub use server::Dispatch;
pub use server::ListenerConfig;
pub use server::ListenerHandle;
pub use server::MetricsSnapshot;
pub use server::Principal;
pub use server::PushClosed;
pub use server::PushSender;
pub use server::ServerInfo;
pub use server::Session;
pub use server::NOAUTH;
pub use server::NOPERM;
pub use server::WRONGPASS;

Modules§

client
Thunder RPC client — multiplexed, config-driven (SPEC-003, CLT-xxx).
server
Thunder RPC server — the one listener every family server derives from.
wire
HiveLLM binary RPC wire layer — wire v1, frozen.