{"id":18568941,"url":"https://github.com/cbrewster/imagine","last_synced_at":"2025-04-10T06:31:50.513Z","repository":{"id":95757404,"uuid":"162224803","full_name":"cbrewster/imagine","owner":"cbrewster","description":"Rust UI Framework (WIP)","archived":false,"fork":false,"pushed_at":"2020-04-21T04:04:33.000Z","size":917,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T18:09:47.805Z","etag":null,"topics":["ecs","gui","webrender"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbrewster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-12-18T03:30:01.000Z","updated_at":"2023-02-18T12:43:56.000Z","dependencies_parsed_at":"2023-05-21T22:45:38.889Z","dependency_job_id":null,"html_url":"https://github.com/cbrewster/imagine","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/cbrewster%2Fimagine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrewster%2Fimagine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrewster%2Fimagine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrewster%2Fimagine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbrewster","download_url":"https://codeload.github.com/cbrewster/imagine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248168262,"owners_count":21058801,"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":["ecs","gui","webrender"],"created_at":"2024-11-06T22:31:15.654Z","updated_at":"2025-04-10T06:31:50.489Z","avatar_url":"https://github.com/cbrewster.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Imagine\n\nAn experimental Rust GUI framework.\n\n\u003e **WARNING**\n\u003e\n\u003e This is a work in progress and is not meant to be used in production.\n\nThe current implementation is quite messy, but it is meant as a proof of concept and I plan to rewrite the majority of the code if this approach seems viable.\n\n### Basic Design\n\nImagine uses an ECS library (specs) which maintains all the widgets in the world.\nWidgets are composed of various components which is used to determine layout, rendering, and interactivity.\nCurrently the bulk of the layout and render work is done via trait objects and a single Widget component which stores the Widget trit object.\nThis benefit of this approach is that it allows anyone to build their own custom widgets in a separate crate.\nTo demonstrate this, all the available widgets are in the `imagine_toolkit` crate rather than the `imagine` crate.\nWidgets are identifiable by a `WidgetId` which is a wrapper over a specs `Entity`. A `WidgetId` is only constructed when an entity with a widget component has been added to the `World`.\nWidgets can store these `WidgetId`s to keep track of their children.\nEnd users use `WidgetId`s to build their UI hierarchy and to attach event listeners to widgets.\n\n### Current Features\n\n- Widgets\n  - Flex Box\n  - Padding\n  - Label\n  - Button\n  - Colored Box\n- Basic Interactivity\n  - Hover\n  - Click\n\n### Example\n\n**Calculator**\n\n\u003cimg src=\"calc-example.png\" alt=\"Calculator Example\" width=\"300\"/\u003e\n\n### Inspiration\n\nThe layout is done via Flutter's box constraints and I have taken a lot of inspiration from\n[druid](https://github.com/xi-editor/druid).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbrewster%2Fimagine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbrewster%2Fimagine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbrewster%2Fimagine/lists"}