Expand description
Spikard HTTP Server
Pure Rust HTTP server with language-agnostic handler trait. Language bindings (Python, Node, WASM) implement the Handler trait.
Re-exports§
pub use auth::Claims;pub use auth::api_key_auth_middleware;pub use auth::jwt_auth_middleware;pub use background::BackgroundHandle;pub use background::BackgroundJobError;pub use background::BackgroundJobMetadata;pub use background::BackgroundRuntime;pub use background::BackgroundSpawnError;pub use background::BackgroundTaskConfig;pub use body_metadata::ResponseBodySize;pub use grpc::GrpcConfig;pub use grpc::GrpcHandler;pub use grpc::GrpcHandlerResult;pub use grpc::GrpcRegistry;pub use grpc::GrpcRequestData;pub use grpc::GrpcResponseData;pub use grpc::MessageStream;pub use grpc::StreamingRequest;pub use grpc::StreamingResponse;pub use handler_response::HandlerResponse;pub use handler_trait::Handler;pub use handler_trait::HandlerResult;pub use handler_trait::RequestData;pub use handler_trait::ValidatedParams;pub use jsonrpc::JsonRpcConfig;pub use lifecycle::LifecycleHooks;pub use lifecycle::LifecycleHooksBuilder;pub use lifecycle::request_hook;pub use lifecycle::response_hook;pub use openapi::ContactInfo;pub use openapi::LicenseInfo;pub use openapi::OpenApiConfig;pub use openapi::SecuritySchemeInfo;pub use openapi::ServerInfo;pub use response::Response;pub use server::Server;pub use sse::SseEvent;pub use sse::SseEventProducer;pub use sse::SseState;pub use sse::sse_handler;pub use testing::ResponseSnapshot;pub use testing::SnapshotError;pub use testing::snapshot_response;pub use websocket::WebSocketHandler;pub use websocket::WebSocketState;pub use websocket::websocket_handler;
Modules§
- auth
- Authentication middleware for JWT and API keys.
- background
- bindings
- body_
metadata - Shared metadata stored on
http::Responseextensions. - cors
- CORS (Cross-Origin Resource Sharing) handling
- debug
- Debug logging utilities for spikard-http
- grpc
- gRPC runtime support for Spikard
- handler_
response - handler_
trait - Handler trait for language-agnostic request handling
- jsonrpc
- JSON-RPC protocol support for Spikard HTTP
- lifecycle
- middleware
- HTTP middleware for request validation
- openapi
- OpenAPI 3.1.0 specification generation
- query_
parser - Fast query string parser
- response
- HTTP Response types
- server
- HTTP server implementation using Tokio and Axum
- sse
- Server-Sent Events (SSE) support for Spikard
- testing
- websocket
- WebSocket support for Spikard
Macros§
- debug_
log - Log a debug message if debugging is enabled
- debug_
log_ module - Log a debug message with a specific module/component name
- debug_
log_ value - Log a debug value with pretty-printing
Structs§
- ApiKey
Config - API Key authentication configuration
- Compression
Config - Compression configuration shared across runtimes
- Cors
Config - CORS configuration for a route
- JwtConfig
- JWT authentication configuration
- Parameter
Validator - Parameter validator that uses JSON Schema
- Problem
Details - RFC 9457 Problem Details for HTTP APIs
- Rate
Limit Config - Rate limiting configuration shared across runtimes
- Route
- Route definition with compiled validators
- Route
Metadata - Route metadata extracted from bindings
- Router
- Router that manages routes
- Schema
Registry - Global schema registry for compiled validators
- Schema
Validator - Schema validator that compiles and validates JSON Schema
- Server
Config - Server configuration
- Server
Config Builder - Builder for ServerConfig
- Static
Files Config - Static file serving configuration
Enums§
- Hook
Result - Result of a lifecycle hook execution
- Method
- HTTP method
Constants§
- CONTENT_
TYPE_ PROBLEM_ JSON - Reexport from spikard_core for convenience Content-Type for RFC 9457 Problem Details
Traits§
- Lifecycle
Hook - Trait for lifecycle hooks on native targets (Send + Sync, Send futures).
Type Aliases§
- Route
Handler - Handler function type (placeholder - will be enhanced with Python callbacks)