rill-core 0.3.0

Ядро экосистемы Rill: базовые трейты и сигнальная система
Documentation

rill-core

Domain-agnostic foundation library: lock-free queues, generic vector math, atomic cells, and real-time safe primitives. Powers the Rill audio ecosystem, but applicable to IoT, robotics, embedded systems, and signal processing.

The trait hierarchy

  • Scalar — base numeric trait: arithmetic, min/max/clamp, abs. Implemented for f32, f64, i8, i16, i32, i64.
  • Transcendental — extends Scalar with sin, cos, sqrt, exp, ln. Implemented for f32, f64.

Key components

  • traitsAudioNode, ParameterId, PortId, Clock, Source/Processor/Sink
  • mathScalar, Transcendental traits; lerp, db_to_linear, midi_to_freq; vector submodule
  • vectorVector<T: Scalar, N> trait and implementations: ScalarVector1/2/4/8<T>, SIMD types (F32x4, F64x4, etc.), slice operations
  • bufferPipeBuffer, FanOutBuffer, FanInBuffer, RingBuffer, DelayLine, AtomicCell
  • queues — lock-free SpscQueue and RingQueue (no_std, no external deps); MpscQueue (alloc); CommandQueue (std, crossbeam-channel)
  • timeClockTick, SystemClock, tempo and beat tracking
  • macrosprocessor_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