Expand description
auralis-signal: Reactive signal primitive with version tracking and proactive waker deregistration.
§Overview
This crate provides Signal<T> and Memo<T> — the foundational
reactive primitives of the Auralis kernel. Every signal carries a
monotonic version number. When a change-detection future is dropped
before resolution, it eagerly removes its waker from the signal’s
internal list, preventing stale-waker accumulation (the “proactive
deregistration” guarantee).
The crate is zero-dependency, #![forbid(unsafe_code)], and
intentionally single-threaded (!Send / !Sync). See the
repository design docs for the
rationale behind those choices.
§Quick example
use auralis_signal::Signal;
let sig = Signal::new(0);
sig.set(1);
assert_eq!(sig.read(), 1);Macros§
Structs§
- Filter
Changed Future - A
Futurethat yields a new signal value only when it satisfies a predicate. - MapChanged
Future - A
Futurethat transforms each new signal value through a mapping function. - Memo
- A lazy, auto-tracking computed signal.
- Signal
- A reactive value container with monotonic version tracking.
- Signal
Changed Future - A
Futurethat completes with the signal’s current value on the next mutation. - Signal
Map - A lightweight read-only projection of a
Signal.