🪇 Rattles

Rattles is a minimal, dependency-free terminal spinner library for Rust. It makes no assumptions about how the output will be used.
Quick Start
Minimal example
use ;
use prelude as presets;
Custom keyframes
rattle!
no_std
rattles enables the std feature by default. To opt out:
Without std, the global clock is unavailable. Animations can still be driven three ways:
- Time-based, with an external clock:
rattle.frame_at - Index-based:
rattle.frame - Tick-based:
Note thatlet mut rattle = dots.into_ticked; rattle.tick; let frame = rattle.current_frame;TickedRattleris stateful and must be stored outside the render loop.
Presets
Built-in presets are organized by category:
presets::arrowspresets::asciipresets::braillepresets::emoji
A prelude is available rattles::prelude.
Examples
Acknowledgements
Rattles includes spinners sourced from these wonderful projects. We gratefully acknowledge their work.