[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-79076":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":15,"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":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":28,"discoverSource":29},79076,"tuie","jake-stewart\u002Ftuie","jake-stewart","A rich, performant TUI library for Rust.","",null,"Rust",242,13,2,0,24,208,7,65.44,"MIT License",false,"main",true,[],"2026-06-12 04:01:24","# tuie\n\nA rich, performant TUI library for Rust.\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fec1d8d8d-e476-4b78-8404-dd234d5a2ec7\n\n### Features\n\n- **Layout:** Flexbox, grids, splits, and virtualized lists, all with min, max, and preferred-size constraints.\n- **Images:** Kitty with sixel and half-block fallbacks, all working over SSH and tmux passthrough.\n- **Input:** Iterator-based extensible text input with vi, emacs, modern, and custom bindings.\n- **Harmonious:** Generated 256-color palette, consistent with user's base16 theme, zero config.\n- **Chords:** Construct and match on human readable inputs: `chord!(Ctrl + Arrow(Up | Down))`\n- **Async:** Timers and async callbacks with support for any async runtime.\n- **Performance:** Per subtree\u002Fwidget\u002Fcell dirty tracking, batched queries, shared memory graphics, packed structs.\n- **GUI:** Optionally run as a GUI with box-drawing, smooth scrolling.\n\n## Getting started\n\nInstall:\n\n```sh\ncargo add tuie --features=harmonious\n```\n\nWrite your main:\n\n```rust\nuse tuie::prelude::*;\nuse std::process::ExitCode;\n\nfn main() -> std::io::Result\u003CExitCode> {\n    let root = Pane::new()\n        .border(Border::SINGLE)\n        .child(Text::new().content(\"hello world\"));\n    tuie::start_tui(root)\n}\n```\n\nRun:\n\n```sh\ncargo run\n```\n\n### Constructing widgets\n\nChain builders to create a simple widget tree:\n\n```rust\nfn greeting(name: String) -> Box\u003CPane> {\n    Pane::new()\n        .border(Border::SINGLE)\n        .child(Text::new().content(format!(\"hello {name}\")))\n}\n```\n\nOr compose widgets together for something more complicated:\n\n```rust\nstruct Greeting {\n    root: Box\u003CPane>,\n    text_id: WidgetId\u003CText>,\n}\n\nimpl Greeting {\n    fn new(name: &str) -> Box\u003CSelf> {\n        let mut text_id = WidgetId::EMPTY;\n        let root = Pane::new().border(Border::SINGLE).child(\n            Text::new().content(format!(\"hello {name}\")).id(&mut text_id)\n        );\n        Box::new(Self { root, text_id })\n    }\n\n    fn set_name(&mut self, name: &str) {\n        if let Some(text) = self.root.get_widget_mut(self.text_id) {\n            text.set_content(format!(\"hello {name}\"));\n        }\n    }\n}\n\nimpl DelegateWidget for Greeting {\n    tuie::delegate_widget!(root);\n\n    fn override_on_input(&mut self, queue: &mut InputQueue) -> InputResult {\n        \u002F\u002F you can override or react to your root widget's events and methods\n        \u002F\u002F using after_* and override_*.\n        return self.root.on_input(queue);\n    }\n}\n```\n\nYou can also `impl Widget` yourself, which is how all of the default widgets are implemented.\n\n## Examples\n\n- [`tuie-demo`](https:\u002F\u002Fgithub.com\u002Fjake-stewart\u002Ftuie-demo): discoverable, interactive reference covering most widgets and features.\n- [`fz`](https:\u002F\u002Fgithub.com\u002Fjake-stewart\u002Ffz): fuzzy finder built on tuie, a real-world example of a non-trivial application.\n\n## Feature flags\n\n- `harmonious` — enables Lab-space palette generation from the terminal's base16 colors.\n- `images` — enables the `Image` widget and `ImageConfig`\u002F`ImageProtocol`\u002F`ImageSource` types; pulls in the `image` crate.\n- `gui` — enables `start_gui` and the `gui` module; pulls in `winit`, `wgpu`, `pollster`, `fontdb`, and `freetype-rs` (plus `objc2` on macOS). Implies `harmonious`.\n\n","tuie 是一个为 Rust 语言设计的高性能终端用户界面库。它提供了丰富的布局选项，包括 Flexbox、网格和虚拟列表等，并支持图像渲染、自定义输入绑定以及异步操作。此外，tuie 通过子树\u002F小部件\u002F单元格脏数据跟踪、批量查询和共享内存图形等技术保证了优秀的性能表现。此库非常适合需要在终端环境中创建交互式应用程序或工具的开发者使用，比如构建命令行界面下的模糊查找器或其他复杂的应用程序。","2026-06-11 03:57:25","CREATED_QUERY"]