{"id":13599216,"url":"https://github.com/paarthmadan/cube","last_synced_at":"2025-03-18T07:30:31.882Z","repository":{"id":86041809,"uuid":"255725395","full_name":"paarthmadan/cube","owner":"paarthmadan","description":"A tui for cube timing, written in Rust.","archived":false,"fork":false,"pushed_at":"2021-09-12T22:49:12.000Z","size":635,"stargazers_count":35,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T07:52:35.718Z","etag":null,"topics":["cube-timer","multithreading","rust","termion","tui","tui-rs"],"latest_commit_sha":null,"homepage":"","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/paarthmadan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-04-14T21:01:56.000Z","updated_at":"2025-01-03T21:59:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"7544362d-6a3c-4444-9373-8e14f2df1a51","html_url":"https://github.com/paarthmadan/cube","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paarthmadan%2Fcube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paarthmadan%2Fcube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paarthmadan%2Fcube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paarthmadan%2Fcube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paarthmadan","download_url":"https://codeload.github.com/paarthmadan/cube/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910715,"owners_count":20367538,"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","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":["cube-timer","multithreading","rust","termion","tui","tui-rs"],"created_at":"2024-08-01T17:01:00.983Z","updated_at":"2025-03-18T07:30:31.417Z","avatar_url":"https://github.com/paarthmadan.png","language":"Rust","funding_links":[],"categories":["💻 Apps"],"sub_categories":["🌌 Other"],"readme":"# Cube Timer\nA tui-based Rubik's cube timer written in _Rust_.\n\n![Cube demo](assets/cube.png)\n\n![Cube demo in larger TMUX session](assets/setup.png)\n\n#### Instructions (pre-release)\n\n```sh\ngit clone https://github.com/paarthmadan/cube \u0026\u0026 cd cube\ncargo install --path .\ncube\n```\n\n1. Press \u003ckbd\u003eSpace\u003c/kbd\u003e to begin and end a solve\n2. Press \u003ckbd\u003eq\u003c/kbd\u003e to exit the process\n\nStill heavily in development – proper build and release instructions will be added shortly.\n\n#### Feature List\n\n- [x] Timer\n- [x] Basic TUI\n- [x] Scramble generator\n- [x] Statistics\n- [x] Solve graph\n- [x] Persisting data across sessions (data written to `~/.cube/data.json`)\n\n#### Not yet implemented\n- [ ] Minimizing CPU usage\n- [ ] Toggling between different cube sessions\n- [ ] Custom configuration (colours etc.)\n- [ ] Optimizing UI for different frame sizes (right now it's ideally used in a small tmux pane off to the side :/)\n\n#### How does it work?\n- Built on top of the [tui-rs](https://github.com/fdehau) crate.\n- The process itself is really a glorified timer:\n  - There are a few threads:\n    - Keyboard Input\n    - Redraw Interrupt Dispatcher\n- Communication between threads uses basic message passing – Rust has a nice paradigm for this called [mpsc](https://doc.rust-lang.org/std/sync/mpsc/).\n- The main thread performs blocked-waiting for interrupts (events) spawned by other threads. Starvation isn't an issue because the redraw interrupt is dispatched at a fixed interval.\n- The [tick rate for the process is currently set to 50](https://github.com/paarthmadan/cube/blob/master/src/event_handler.rs#L52), which would mean the process exhibits roughly 20FPS, which is sufficient.\n\n#### Motivation\n- Practicing Rust\n- Applying some of the fundamentals learned from Operating Systems\n- Now I don't have to open my browser everytime I feel like cubing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaarthmadan%2Fcube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaarthmadan%2Fcube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaarthmadan%2Fcube/lists"}