[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-769":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":15,"starSnapshotCount":15,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},769,"rattles","vyfor\u002Frattles","vyfor","🪇 Minimal terminal spinners for Rust","https:\u002F\u002Fdocs.rs\u002Frattles",null,"Rust",973,19,4,0,1,12,3,7.9,"MIT License",false,"master",true,[25,26,27,28,5,29,30,31,32,33],"animation","cli","no-std","ratatui","rust","spinner","spinners","terminal","tui","2026-06-12 02:00:18","# 🪇 Rattles\n\n![Demo](.\u002F.github\u002Fassets\u002Fdemo.gif)\n\n**Rattles** is a minimal, dependency-free terminal spinner library for Rust. It makes no assumptions about how the output will be used.\n\n## Quick Start\n\n```sh\ncargo add rattles\n```\n\n### Minimal example\n\n```rust\nuse std::{io::Write, time::Duration};\nuse rattles::presets::prelude as presets;\n\nfn main() {\n    let rattle = presets::waverows();\n\n    \u002F\u002F change default interval\n    \u002F\u002F let rattle = presets::waverows().set_interval(Duration::from_millis(100));\n\n    \u002F\u002F reverse direction\n    \u002F\u002F let rattle = presets::waverows().reverse();\n\n    loop {\n        print!(\"\\r{}\", rattle.current_frame());\n        std::io::stdout().flush().unwrap();\n        std::thread::sleep(Duration::from_millis(20));\n    }\n}\n```\n\n### Custom keyframes\n\n```rust\nrattle!(\n    Custom, \u002F\u002F struct name\n    custom, \u002F\u002F method name\n    1,      \u002F\u002F row count (width of the spinner)\n    100,    \u002F\u002F interval in milliseconds\n    [\"⣾\", \"⣷\", \"⣯\", \"⣟\", \"⣻\", \"⣽\", \"⣾\"] \u002F\u002F keyframes\n)\n```\n\n### `no_std`\n\n`rattles` enables the `std` feature by default. To opt out:\n\n```sh\ncargo add rattles --no-default-features\n```\n\nWithout `std`, the global clock is unavailable. Animations can still be driven three ways:\n\n- Time-based, with an external clock: \n    ```rs\n    rattle.frame_at(elapsed)\n    ```\n- Index-based:\n    ```rs\n    rattle.frame(n)\n    ```\n- Tick-based:\n    ```rust\n    let mut rattle = presets::dots().into_ticked();\n    rattle.tick();\n    let frame = rattle.current_frame();\n    ```\n    Note that `TickedRattler` is stateful and must be stored outside the render loop.\n\n## Presets\n\nBuilt-in presets are organized by category:\n\n- `presets::arrows`\n- `presets::ascii`\n- `presets::braille`\n- `presets::emoji`\n\nA prelude is available `rattles::prelude`.\n\n## Examples\n\n- a minimal ratatui [example](.\u002Fexamples\u002Fratatui.rs)\n- a no_std-oriented [example](.\u002Fexamples\u002Fno_std.rs)\n\n## Acknowledgements\n\nRattles includes spinners sourced from these wonderful projects. We gratefully acknowledge their work.\n\n- [sindresorhus\u002Fcli-spinners](https:\u002F\u002Fgithub.com\u002Fsindresorhus\u002Fcli-spinners)\n- [gunnargray-dev\u002Funicode-animations](https:\u002F\u002Fgithub.com\u002Fgunnargray-dev\u002Funicode-animations)\n","Rattles 是一个为 Rust 语言设计的轻量级终端加载动画库。它不依赖任何外部库，并且对输出没有预设限制，支持自定义关键帧和多种内置样式如箭头、ASCII字符、盲文点以及表情符号等。项目还提供了无标准库（`no_std`）的支持，使得在资源受限环境中也能运行，通过时间、索引或计数器三种方式驱动动画。适用于需要向命令行界面添加简单但吸引人的加载指示符的各种场景，特别是那些追求最小化依赖和高性能的应用程序。",2,"2026-06-11 02:39:11","CREATED_QUERY"]