{"id":20721485,"url":"https://github.com/cleancut/rusty_textui","last_synced_at":"2025-07-26T10:14:51.255Z","repository":{"id":206577015,"uuid":"717179593","full_name":"CleanCut/rusty_textui","owner":"CleanCut","description":"Library for creating simple text user interfaces, like text arcade games in the terminal","archived":false,"fork":false,"pushed_at":"2023-11-21T22:13:17.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-28T07:42:18.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CleanCut.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license/APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-10T18:36:47.000Z","updated_at":"2024-03-09T15:11:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a1bcca6-e5e4-4b33-b577-3d1110d3a691","html_url":"https://github.com/CleanCut/rusty_textui","commit_stats":null,"previous_names":["cleancut/rusty_textui"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/CleanCut/rusty_textui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_textui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_textui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_textui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_textui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleanCut","download_url":"https://codeload.github.com/CleanCut/rusty_textui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Frusty_textui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267149766,"owners_count":24043461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T03:28:01.911Z","updated_at":"2025-07-26T10:14:51.233Z","avatar_url":"https://github.com/CleanCut.png","language":"Rust","readme":"# Rusty Text UI (`rusty_textui`)\n\n`rusty_textui` is a simple Text UI engine intended to be used by people who are just beginning to learn Rust. It has a simple interface with enough functionality to easily create a terminal-based game or application. I created it specifically for students of my [Ultimate Rust Crash Course] to use to for their course projects. You may want to use this together with [rusty_audio] to produce sound, and [rusty_time] for timers.\n\n## Quick Start\n\nIn your terminal, add `rusty_textui` to your project:\n\n```\ncargo add rusty_textui\n```\n\nIn your code:\n\n```rust\nuse rusty_textui::prelude::*; // Bring all the important stuff into scope\n\nfn main() {\n    // Create the screen\n    let mut screen = Screen::new(80, 25, false);\n\n    // Set up game/application logic\n    let mut player_col: usize = 0;\n\n    // Set up a main loop, with a label so it can be exited easily\n    'mainloop: loop {\n        // Handle user input\n        for key_event in screen.get_key_events() {\n            match key_event.code {\n                KeyCode::Right =\u003e player_col = (player_col + 1).clamp(0, 79),\n                KeyCode::Left =\u003e player_col = player_col.saturating_sub(1),\n                KeyCode::Esc =\u003e break 'mainloop, // Esc key exits the main loop\n                _ =\u003e {}\n            }\n        }\n\n        // Draw the current state of everything\n        screen.draw(player_col, 12, \"X\", Color::Blue);\n\n        // Flip the frames so the one we drew to is visible, and a new blank frame is ready for us\n        // to draw the next frame to.\n        screen.flip();\n    }\n}\n\n```\n\n## Contribution\n\nAll contributions are assumed to be dual-licensed under MIT/Apache-2.\n\n## License\n\nDistributed under the terms of both the MIT license and the Apache License (Version 2.0).\n\nSee [license/APACHE](license/APACHE) and [license/MIT](license/MIT).\n\n## Sponsor\n\nIf you like Rusty Audio, please consider [sponsoring me] on GitHub. 💖\n\n[rusty_audio]: https://github.com/CleanCut/rusty_audio\n[rusty_time]: https://github.com/CleanCut/rusty_time\n[sponsoring me]: https://github.com/sponsors/CleanCut\n[Ultimate Rust Crash Course]: https://agileperception.com/ultimate_rust_crash_course\n","funding_links":["https://github.com/sponsors/CleanCut"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleancut%2Frusty_textui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleancut%2Frusty_textui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleancut%2Frusty_textui/lists"}