{"id":14197805,"url":"https://github.com/tarkah/roc-iced","last_synced_at":"2025-05-07T02:44:21.625Z","repository":{"id":247151189,"uuid":"824699999","full_name":"tarkah/roc-iced","owner":"tarkah","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-15T21:06:05.000Z","size":146,"stargazers_count":14,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T05:33:17.730Z","etag":null,"topics":["iced","roc-lang"],"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/tarkah.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-05T18:11:04.000Z","updated_at":"2025-01-23T13:07:50.000Z","dependencies_parsed_at":"2024-08-19T01:01:25.524Z","dependency_job_id":"2f8036c7-5d45-43cb-8c01-71b74a630948","html_url":"https://github.com/tarkah/roc-iced","commit_stats":null,"previous_names":["tarkah/roc-iced"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkah%2Froc-iced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkah%2Froc-iced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkah%2Froc-iced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkah%2Froc-iced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarkah","download_url":"https://codeload.github.com/tarkah/roc-iced/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252802668,"owners_count":21806553,"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":["iced","roc-lang"],"created_at":"2024-08-19T01:00:43.523Z","updated_at":"2025-05-07T02:44:21.596Z","avatar_url":"https://github.com/tarkah.png","language":"Rust","funding_links":[],"categories":["Roc Platforms 🏢"],"sub_categories":[],"readme":"# Roc Iced\n\nA [Roc](https://github.com/roc-lang/roc) plaform for building [Iced](https://github.com/iced-rs/iced) applications.\n\n## Example\n\nRun the basic example: `roc run examples/basic.roc`\n\n![demo](./assets/demo.gif)\n\n```elm\napp [program, Model, Message] {\n    iced: platform \"../platform/main.roc\",\n}\n\nimport iced.Color\nimport iced.Element.Container as Container\nimport iced.Element.Container exposing [container]\nimport iced.Element exposing [Element]\nimport iced.Settings exposing [Settings]\n\nprogram = { init, update, view }\n\nModel : { count : U64, isFooChecked : Bool, isBarChecked : Bool, input : Str }\n\nMessage : [\n    IncrementCount,\n    FooToggled Bool,\n    BarToggled Bool,\n    Input Str,\n    Submitted,\n]\n\ninit : { model : Model, settings : Settings }\ninit = {\n    model: { count: 0, isFooChecked: Bool.false, isBarChecked: Bool.true, input: \"\" },\n    settings: Settings.default |\u003e Settings.size { width: 300, height: 300 },\n}\n\nupdate : Model, Message -\u003e Model\nupdate = \\model, message -\u003e\n    when message is\n        IncrementCount -\u003e { model \u0026 count: model.count + 1 }\n        FooToggled isFooChecked -\u003e { model \u0026 isFooChecked }\n        BarToggled isBarChecked -\u003e { model \u0026 isBarChecked }\n        Input input -\u003e { model \u0026 input }\n        Submitted -\u003e { model \u0026 input: \"\" }\n\nview : Model -\u003e Element Message\nview = \\model -\u003e\n    Column [\n        Text \"Roc + Iced \u003c3\",\n        Button {\n            content: Text \"Pressed $(Num.toStr model.count) times\",\n            onPress: Active IncrementCount,\n        },\n        Checkbox {\n            label: \"Foo\",\n            isChecked: model.isFooChecked,\n            onToggle: Active FooToggled,\n        },\n        Checkbox {\n            label: \"Bar\",\n            isChecked: model.isBarChecked,\n            onToggle: Active BarToggled,\n        },\n        Checkbox {\n            label: \"Baz\",\n            isChecked: Bool.false,\n            onToggle: Disabled,\n        },\n        TextInput {\n            value: model.input,\n            width: Fixed 150,\n            onInput: Active Input,\n            onSubmit: Active Submitted,\n        },\n    ]\n    |\u003e boxed\n    |\u003e centered\n\ncentered = \\elem -\u003e\n    elem\n    |\u003e container\n    |\u003e Container.center Fill\n\nboxed = \\elem -\u003e\n    background = Some (Color.fromHex 0xcad4e0ff)\n    border = { width: 1, color: Color.black, radius: 3 }\n    style = { border, background }\n\n    elem\n    |\u003e container\n    |\u003e Container.padding 8\n    |\u003e Container.style style\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarkah%2Froc-iced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarkah%2Froc-iced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarkah%2Froc-iced/lists"}