Agent skill · software engineering · aradotso

rattles-terminal-spinners

Minimal terminal spinner library for Rust with preset collection and no-std support

Why this skill is useful

Provides domain-specific knowledge on creating terminal spinners in Rust, including no_std support and custom spinner definitions.

What it needs

Requires cargo installed locally. About 4k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.

What this skill does

Rattles Terminal Spinners Skill by ara.so — Daily 2026 Skills collection. Rattles is a minimal, zero-dependency Rust library for terminal spinners. It has no runtime or lifecycle — spinners are constructed directly in render loops with negligible cost. Supports nostd environments. Installation Or via CLI: Core Concepts Rattler: a spinner definition (frames + interval). Stateless and cheap to construct. TickedRattler: stateful wrapper for tick-based driving (required in nostd). Presets: built-in spinners organized by category. rattle! macro: define custom spinners at compile time. Basic Usage (std) currentframe() uses the system clock internally — no state needed. Preset Categories Rattler API TickedRattler (Stateful / nostd-friendly) TickedRattler must be stored (it holds state). Suitable for nostd contexts where the global clock is unavailable. Index-Based Animation (nostd) Time-Based Animation with External Clock (nostd) Custom Spinners with rattle! Macro Multi-row custom spinner: Ratatui Integration Since Rattler is stateless, pass it by reference anywhere — no Arc<Mutex<>> needed. nostd Setup Common Patterns Spinner with message Async-compatible (tokio) Collecting all frames Troubleshooting Spinner not animating (stuck on first frame) Ensure you're flushing stdout: std::io::stdout().flush().unwrap() Use \r to overwrite the line, not \n The sleep interval should match or be shorter than the spinner's interval currentframe() not available in nostd Use frameat(duration), frame(index), or intoticked() instead Disable default features: rattles = { version = "...", default-features = false } Custom spinner not compiling Keyframes must be string literals in the rattle! macro array Row count must match the visual width of each keyframe string Spinner looks garbled in terminal Some braille/emoji frames require a terminal with Unicode support Test with ASCII presets (ascii::line()) to verify basic functionality first

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aradotso/rattles-terminal-spinners

View the source on GitHub

Browse the @skills marketplace