{"id":39937477,"url":"https://github.com/samoylenkodmitry/cranpose","last_synced_at":"2026-03-07T20:09:41.961Z","repository":{"id":318824641,"uuid":"1072057106","full_name":"samoylenkodmitry/Cranpose","owner":"samoylenkodmitry","description":"Cranpose is a Jetpack Compose-inspired declarative Rust UI framework. https://crates.io/crates/cranpose","archived":false,"fork":false,"pushed_at":"2026-01-31T15:46:03.000Z","size":4959,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-01T01:27:28.160Z","etag":null,"topics":["jetpack-compose","rust","ui-framework"],"latest_commit_sha":null,"homepage":"https://samoylenkodmitry.github.io/Cranpose","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samoylenkodmitry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-10-08T07:46:35.000Z","updated_at":"2026-01-31T15:46:06.000Z","dependencies_parsed_at":"2025-10-16T12:19:14.331Z","dependency_job_id":"05b712d6-345d-4365-8bd1-42e068fa3412","html_url":"https://github.com/samoylenkodmitry/Cranpose","commit_stats":null,"previous_names":["samoylenkodmitry/compose-rs-proposal","samoylenkodmitry/rs-compose","samoylenkodmitry/cranpose"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/samoylenkodmitry/Cranpose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samoylenkodmitry%2FCranpose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samoylenkodmitry%2FCranpose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samoylenkodmitry%2FCranpose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samoylenkodmitry%2FCranpose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samoylenkodmitry","download_url":"https://codeload.github.com/samoylenkodmitry/Cranpose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samoylenkodmitry%2FCranpose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29172867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["jetpack-compose","rust","ui-framework"],"created_at":"2026-01-18T19:00:46.061Z","updated_at":"2026-02-16T11:12:34.582Z","avatar_url":"https://github.com/samoylenkodmitry.png","language":"Rust","readme":"[https://codewiki.google/github.com/samoylenkodmitry/cranpose](https://codewiki.google/github.com/samoylenkodmitry/rs-compose)\n\n[v0.0.40.webm](https://github.com/user-attachments/assets/df50209b-abfd-426a-b79c-a51a9543b385)\n\n## 🌐 Live Demo\n\n**[Try it in your browser!](https://samoylenkodmitry.github.io/Cranpose/)**\n\n# Cranpose\n\n\u003cimg width=\"1536\" height=\"1024\" alt=\"ChatGPT Image Jan 18, 2026, 10_53_13 AM\" src=\"https://github.com/user-attachments/assets/2ce48dfe-a048-4b9d-8812-a0e4534691f8\" /\u003e\n\nCranpose is a declarative UI framework for Rust, inspired by Jetpack Compose. It enables developers to build user interfaces for Desktop, Android, and Web (WASM) using a single Rust codebase.\n\n## Quick Start via Isolated Demo\n\nTo get started, we recommend using the **Isolated Demo** template found in `apps/isolated-demo`. This project is pre-configured with the necessary dependencies and build scripts for all supported platforms.\n\n```bash\n# Clone the repository\ngit clone https://github.com/samoylenkodmitry/cranpose.git\ncd cranpose/apps/isolated-demo\n\n# Run on Desktop (Linux/macOS/Windows)\ncargo run --features desktop,renderer-wgpu\n```\n\n## Example: Todo List Application\n\nThe following example demonstrates managing state, handling user input, and rendering a dynamic list.\n\n```rust\nuse cranpose::prelude::*;\n\n#[derive(Clone)]\nstruct TodoItem {\n    id: usize,\n    text: String,\n    done: bool,\n}\n\n#[composable]\nfn TodoApp() {\n    // State management using useState\n    let items = useState(|| vec![\n        TodoItem { id: 0, text: \"Buy milk\".into(), done: false },\n        TodoItem { id: 1, text: \"Walk the dog\".into(), done: true },\n    ]);\n    let input_text = useState(|| String::new());\n    let next_id = useState(|| 2);\n\n    Column(Modifier.fill_max_size().padding(20.0), || {\n        Text(\"My Todo List\", Modifier.padding(10.0).font_size(24.0));\n\n        // Input Row\n        Row(Modifier.fill_max_width().padding(5.0), || {\n            BasicTextField(\n                value = input_text.value(),\n                on_value_change = move |new_text| input_text.set(new_text),\n                Modifier.weight(1.0).padding(5.0)\n            );\n            \n            Button(\n                onClick = move || {\n                    if !input_text.value().is_empty() {\n                        let mut list = items.value();\n                        list.push(TodoItem {\n                            id: next_id.value(),\n                            text: input_text.value(),\n                            done: false,\n                        });\n                        items.set(list);\n                        next_id.set(next_id.value() + 1);\n                        input_text.set(String::new());\n                    }\n                }, \n                || Text(\"Add\")\n            );\n        });\n        \n        // Dynamic List Rendering\n        LazyColumn(Modifier.weight(1.0), || {\n            items(items.value().len(), |i| {\n                let item = items.value()[i].clone();\n                \n                Row(\n                    Modifier\n                        .fill_max_width()\n                        .padding(5.0)\n                        .clickable(move || {\n                            // Toggle done status\n                            let mut list = items.value();\n                            if let Some(todo) = list.iter_mut().find(|t| t.id == item.id) {\n                                todo.done = !todo.done;\n                            }\n                            items.set(list);\n                        }),\n                    || {\n                        Text(if item.done { \"[x]\" } else { \"[ ]\" });\n                        Spacer(Modifier.width(10.0));\n                        Text(\n                            item.text, \n                            Modifier.alpha(if item.done { 0.5 } else { 1.0 })\n                        );\n                    }\n                );\n            });\n        });\n    });\n}\n```\n\n## Platform Support and Building\n\n### Desktop\nSupported on Linux, macOS, and Windows via `winit` and `wgpu`.\n```bash\ncargo run --bin desktop-app\n```\n\n### Android\nSupported using `cargo-ndk` and `android-activity`.\n```bash\n# Prerequisites: cargo install cargo-ndk\ncd apps/android-demo/android\n./gradlew installDebug\n```\nRefer to [`apps/android-demo/README.md`](apps/android-demo/README.md) for full configuration details.\n\n### Web (WASM)\nSupported via `wasm-bindgen` and WebGL2.\n```bash\n# Prerequisites: cargo install wasm-pack\ncd apps/desktop-demo\n./build-web.sh\npython3 -m http.server 8080\n```\nRefer to [`apps/desktop-demo/README.md`](apps/desktop-demo/README.md) for web build details.\n\n## License\nThis project is available under the terms of the Apache License (Version 2.0). See [`LICENSE-APACHE`](LICENSE-APACHE) for the full license text.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamoylenkodmitry%2Fcranpose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamoylenkodmitry%2Fcranpose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamoylenkodmitry%2Fcranpose/lists"}