Expand description
The pipe algebra and the runtime-agnostic primitives beneath it.
One trait, pipe::Pipe, carries typed In -> Out with an associated
Err; picking In or Out as () gives the four forms (transform,
source, sink, observe). Everything else here composes over it or sits
under it.
pipe–pipe::Pipeand its additiveSendformpipe::SendPipe, thePipeExtcombinator sugar (.and_then/.filter/.fanout/.fanin),Request/Responseenvelopes overBytes,HeaderList, the streaming bodies (ResponseStream/RequestStreamoverChunkStream) and the in-processCarrypayload,Handler(Request<Bytes> -> Response<Bytes>),SourcePipe, and the resilience, rate-limit, retry, routing and telemetry/capture surfaces. Plugin authors’ primary surface.sync– runtime-agnostic concurrency primitives shaped liketokio::sync(Mutex,Notify,mpsc,oneshot,watch,broadcast, plusblocking,task,shutdown), so no pipe needs tokio to coordinate.stream– byte-stream and datagram traits (StreamConnection,StreamListener,StreamUpstream,DatagramSocket) built onfutures::io, shared by every wire-protocol stack above them.transport–Replay(record-and-replay of a stream with fan-out sinks), thetap_completetaps and theGenericStreamseam; sits belowpipe.driver–block_on, the no-runtime way to drive one future to completion.codec,block_layout,float_layout– data descriptions of packed numeric storage:Codecnames a packed byte layout,BlockLayoutdescribes a block of stored numbers,FloatLayoutone stored float.
The crate is no_std unless the default std feature is on. pipe
splits further: the pipe forms compile with no allocator, most of the
envelope and combinator surface needs alloc, and registries and
lifecycle helpers need std. Each item’s own doc names its tier.
Re-exports§
Modules§
- block_
layout - A block layout describes how a run of stored numbers is packed: how many elements share one
scale (and optional min), where each bit plane of an element’s code lives, how sub-blocks of
the block carry their own scale and min, and how a code becomes a value,
(multiplier * code - bias) * scale * sub_scale + min_multiplier * (min * sub_min). - codec
- The one source-neutral codec identity: which packed byte layout a
quantized/packed buffer holds. Payload-less by design – a pipe or fn
pointer cannot serialize itself to a wire byte, so a sidecar wire format
(
proxima-model-interop’s expert sidecar today) needs a compile-time- exhaustive, serializable tag instead.Codec::tag/Codec::from_tagare that wire mapping. - driver
- the no-runtime drive primitive:
block_on. - float_
layout - A float layout is a tuple of exponent width, mantissa width and special-value policy; the
scalar codecs
proxima-gguf/src/quant/bf8_e5m2.rsandbf4_e2m1.rswill instantiate it instead of each hand-coding the same arithmetic. - pipe
- Plugin surface for proxima.
- stream
- Bidirectional byte-stream primitive. Trait bound is
futures::io(nottokio::io) so non-tokio backends — AF_XDP, DPDK, glommio, smol — can implement without a tokio dep. Tokio backends use thetokio-util::compatshim at the impl boundary. - sync
proxima::sync— runtime-agnostic concurrency primitives shaped liketokio::sync. Users get the API surface they expect (use proxima_primitives::sync::Mutex;) without pulling tokio. Backing crates arefutures(channels, lock::Mutex),async-lock(RwLock, Semaphore),event-listener(Notify), andasync-broadcast(watch, broadcast).- transport
- Transport stream primitives:
Replay, thetap_completetaps, and theGenericStreamseam.