Skip to main content

Crate rill_core

Crate rill_core 

Source
Expand description

§Rill Core

The core of the Rill ecosystem. Provides fundamental traits, types, and utilities for building real-time signal processing applications.

§Architecture Overview

rill-core/
├── traits/           # Core traits (Algorithm, Parameter, ProcessError)
├── math/             # Mathematical abstractions (Scalar, Transcendental, Vector)
│   └── vector/       # Vector types, SIMD abstractions, slice operations
├── buffer/           # Lock-free signal buffers with AtomicCell safety
├── queues/           # Real-time safe command queues
├── time/             # Time and clock abstractions (ClockTick, SystemClock)
├── io/               # Generic I/O backend trait (IoBackend)
├── macros/           # Node creation macros (source_node!, processor_node!, etc.)
├── prelude           # Convenience prelude for common imports
└── interpolate       # Fractional-index interpolation trait

§Key Concepts

  • Scalar: Base numeric trait for any type (floats and integers)
  • Transcendental: Float numeric abstraction with sin/cos/sqrt
  • AtomicCell: Safe atomic wrapper for lock-free data structures
  • Algorithm: Core processing trait for signal nodes
  • PipeBuffer: Zero-copy connections between nodes
  • CommandQueue: Real-time safe parameter automation
  • ClockTick: Sample-accurate timing for synchronization

§Getting Started

See crate-level documentation and module docs for usage examples.

Re-exports§

pub use traits::Algorithm;
pub use traits::AsAny;
pub use traits::IntoParamValue;
pub use traits::MultichannelAlgorithm;
pub use traits::ParamMetadata;
pub use traits::ParamRange;
pub use traits::ParamType;
pub use traits::ParamValue;
pub use traits::ParameterError;
pub use traits::ParameterId;
pub use traits::Params;
pub use traits::ProcessError;
pub use traits::ProcessResult;
pub use traits::SisoAdapter;
pub use builtin::MultichannelBlockBuiltin;
pub use math::Scalar;
pub use math::Transcendental;
pub use buffer::AtomicCell;
pub use buffer::AtomicCellError;
pub use buffer::AtomicStats;
pub use buffer::Buffer;
pub use buffer::BufferError;
pub use buffer::BufferResult;
pub use buffer::BufferStats;
pub use buffer::DelayLine;
pub use buffer::FanInBuffer;
pub use buffer::FanOutBuffer;
pub use buffer::PipeBuffer;
pub use buffer::RingBuffer;
pub use queues::QueueError;
pub use queues::QueueResult;
pub use time::ClockSource;
pub use time::ClockTick;
pub use time::RenderContext;
pub use time::SystemClock;
pub use glam;

Modules§

buffer
Lock-free, real-time safe signal buffers
builtin
Built-in function registry for signal processing DSLs Foreign-function registry: DSP/model built-ins callable from rill-lang.
config
Configuration error constructors.
control
Control error constructors (OSC, automation).
interpolate
Fractional-index interpolation trait for slice-like types
io
Generic multi-channel signal I/O abstraction
macros
Macros for node creation and boilerplate reduction Macros.
math
Mathematical abstractions for signal processing
prelude
Convenience prelude for importing common types
queues
Real-time safe command queues for automation
runtime
Runtime error constructors (thread priority, critical violations).
time
Time and clock abstractions for synchronization
traits
Core traits for the Rill ecosystem
utils
Utility functions for common operations

Macros§

error
Create an error with a code and message.
vec_map
Map over SIMD vector chunks of size 4, applying a closure to each chunk.

Structs§

Error
Primary error type for the entire Rill ecosystem.
ErrorLocation
Source location where an error originated.
VersionInfo
Detailed version information for the rill-core crate.

Enums§

ErrorCategory
Error category for grouping related error codes.
ErrorCode
Machine-processable error code.

Constants§

CACHE_LINE_SIZE
Cache line size for alignment (64 bytes on x86_64)
DEFAULT_BLOCK_SIZE
Default block size for signal processing
DEFAULT_BUFFER_SIZE
Default buffer size for most use cases
DEFAULT_SAMPLE_RATE
Default sample rate (44.1 kHz)
MAX_BLOCK_SIZE
Maximum block size
MAX_BUFFER_SIZE
Maximum buffer size (2^16 = 65536 samples)
MAX_SAMPLE_RATE
Maximum supported sample rate
MIN_BLOCK_SIZE
Minimum block size
MIN_BUFFER_SIZE
Minimum buffer size
MIN_SAMPLE_RATE
Minimum supported sample rate
VERSION
Current version of rill-core

Functions§

version_info
Get detailed version information

Type Aliases§

Result
Result type alias for Rill Core operations.