tokilake-core
The high-performance core tunnel and gateway abstraction library for the Tokilake ecosystem.
Overview
tokilake-core provides the fundamental trait definitions, session management, routing logic, and protocol codecs required to build scalable, multiplexed gateways. It sits between the network transport layer and the application edge.
Core Architecture
tunnel: Transport-agnostic tunnel traits (TunnelSession,TunnelStream) using zero-costimpl Futurearchitectures.session: Lock-free, concurrent worker registration and namespace claiming viaDashMap.roundtrip: Asynchronous HTTP-over-Tunnel request/response forwarding with body chunk pumping.protocol: Cross-platform NDJSON protocol definitions used by control planes.gateway: Extensible HTTP/WebSocket handler logic.
Supported Transports
- SMUX: Backward-compatible with standard
tokilakeworkers throughtokilake-smux. - QUIC: Next-generation, zero-RTT capable high-throughput encrypted transport powered by
quinn. - Memory: In-memory stream channels for rapid unit testing.
Integration
tokilake-core is meant to be embedded into applications like tokilake-server.
use SessionManager;
use SmuxSession;
// Initialize the global session manager
let session_manager = new;
// Handle incoming multiplexed streams through the unified traits...
License
MIT License.