rill-core
Domain-agnostic foundation library: lock-free queues, generic vector math, atomic cells, and real-time safe primitives. Powers the Rill ecosystem for IoT, robotics, embedded systems, signal processing, and audio.
The trait hierarchy
Scalar— base numeric trait: arithmetic, min/max/clamp, abs. Implemented forf32,f64,i8,i16,i32,i64.Transcendental— extendsScalarwithsin,cos,sqrt,exp,ln. Implemented forf32,f64.
Key components
- traits —
Node,ParameterId,PortId,Clock,Source/Processor/Sink - math —
Scalar,Transcendentaltraits;lerp,db_to_linear,seconds_to_samples; vector submodule - vector —
Vector<T: Scalar, N>trait and implementations:ScalarVector1/2/4/8<T>, SIMD types (F32x4,F64x4, etc.), slice operations - buffer —
PipeBuffer,FanOutBuffer,FanInBuffer,RingBuffer,DelayLine,AtomicCell - queues — lock-free
SpscQueueandRingQueue(no_std, no external deps);MpscQueue(alloc);CommandQueue(std, crossbeam-channel) - time —
ClockTick,SystemClock, tempo and beat tracking - macros —
processor_node!,source_node!,sink_node!,with_parameters! - error — typed error system
Domain-agnostic primitives
| Component | no_std | Alloc | Description |
|---|---|---|---|
Scalar (i8/i16/i32/i64) |
✅ | — | Integer arithmetic, min/max/clamp |
Scalar (f32/f64) |
✅ | — | Float arithmetic |
Transcendental (f32/f64) |
✅ | — | Float + sin/cos/sqrt/exp/ln |
SpscQueue<T, CAP> |
✅ | — | Lock-free SPSC ring buffer |
RingQueue<T, CAP> |
✅ | — | Lock-free delay-line buffer |
MpscQueue<T> |
✅ | ✅ | Lock-free MPSC (Michael-Scott) |
AtomicCell<T> |
✅ | — | Atomic wrapper for Copy types |
Vector<T, N> + ScalarVectorN<T> |
✅ | — | Generic vector math |
Links
- Repository: https://github.com/DigitalRats/rill
- Documentation: https://docs.rs/rill-core