Skip to content

spt-reasoning-network

QUIC-based networking layer with 0-RTT and stream multiplexing

Overview

Provides high-performance networking using the QUIC protocol for distributed reasoning and pattern synchronization. Includes both a basic QUIC client/server and an advanced Neural Bus with role-based stream multiplexing, Ed25519 intent verification, priority queues, and gossip protocols. The Neural Bus is native-only (excluded from WASM builds).

Key Features

  • QUIC Transport -- Client/server with 0-RTT connection establishment via quinn
  • Neural Bus -- Multi-stream architecture with role-based multiplexing and priority queues
  • Intent Verification -- Ed25519-signed intent-capped actions with IntentVerifier
  • Gossip Protocol -- GossipManager for decentralized state propagation
  • Reasoning Streams -- Parallel verification streams for distributed reasoning
  • Snapshot Streaming -- SnapshotManager for state synchronization

Dependencies

Key internal dependencies:

  • spt-reasoning-core -- Core pattern types for network messages

External: quinn, rustls, rcgen (optional, behind quic feature), ed25519-dalek, prost, sha2.

Usage

rust
use spt_reasoning_network::{
    QuicServer, QuicClient, QuicConfig, NetworkMessage,
    NeuralBus, NeuralBusConfig, StreamRole, Priority,
};

let config = QuicConfig::default();
let server = QuicServer::bind(config).await?;

API Reference

Core Types

TypeDescription
QuicServerQUIC server accepting connections
QuicClientQUIC client for connecting to servers
QuicConfigQUIC transport configuration
QuicConnectionAn established QUIC connection
NetworkMessageMessage type sent over QUIC
NeuralBusAdvanced multi-stream networking bus
NeuralBusConfigConfiguration for the Neural Bus
NeuralStreamA typed stream within the Neural Bus
StreamRoleRole assigned to a stream (gossip, snapshot, reasoning, etc.)
Frame / FrameHeader / FrameTypeWire-level frame types
Intent / IntentVerifier / ScopeEd25519-signed intent-capped actions
Priority / PriorityQueueApplication-level priority management
GossipManager / GossipMessageDecentralized state gossip
SnapshotManagerState snapshot synchronization
ReasoningStreamsParallel reasoning verification streams
NetworkErrorError enum for network operations

Released under the MIT License.