{"id":15494164,"url":"https://github.com/johanholmerin/xilem-cross-platform","last_synced_at":"2026-05-14T21:36:47.500Z","repository":{"id":246828350,"uuid":"822280738","full_name":"johanholmerin/xilem-cross-platform","owner":"johanholmerin","description":"Setup for building xilem on desktop, android, and iOS","archived":false,"fork":false,"pushed_at":"2024-07-02T07:12:04.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-18T21:15:03.911Z","etag":null,"topics":["android","ios","rust","wgpu","winit"],"latest_commit_sha":null,"homepage":"","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/johanholmerin.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-06-30T19:47:47.000Z","updated_at":"2025-08-17T12:24:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"d75bfe93-24d2-4c75-b146-13a3450b4cf0","html_url":"https://github.com/johanholmerin/xilem-cross-platform","commit_stats":null,"previous_names":["johanholmerin/xilem-cross-platform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johanholmerin/xilem-cross-platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanholmerin%2Fxilem-cross-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanholmerin%2Fxilem-cross-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanholmerin%2Fxilem-cross-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanholmerin%2Fxilem-cross-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johanholmerin","download_url":"https://codeload.github.com/johanholmerin/xilem-cross-platform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanholmerin%2Fxilem-cross-platform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278786686,"owners_count":26045588,"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-10-07T02:00:06.786Z","response_time":59,"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":["android","ios","rust","wgpu","winit"],"created_at":"2024-10-02T08:11:53.581Z","updated_at":"2025-10-07T13:54:59.466Z","avatar_url":"https://github.com/johanholmerin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xilem cross-platform\n\nExample setup for using xilem on android, iOS, and desktop\n\n### Instructions\n\n## iOS\n\n\u003e Note: may not work on the Apple iOS Simulator due to lack of capabilites\n\u003e [\\*](https://developer.apple.com/documentation/metal/developing_metal_apps_that_run_in_simulator#3241608)\n\n```sh\nrustup target add aarch64-apple-ios\n\nopen xilem_example_mobile.xcodeproj\n# Configure signing\n\n# Build\n```\n\n### Android\n\n```sh\nrustup target add aarch64-linux-android armv7-linux-androideabi\ncargo install cargo-apk\n\ncargo apk run -p xilem_example_mobile\n```\n\n### Desktop\n\n\u003e Note: only tested on macOS but should work on other systems as well\n\n```sh\ncargo run --manifest-path=./desktop/Cargo.toml\n```\n\n## Architecture\n\n- The android build uses [cargo-apk](https://github.com/rust-mobile/cargo-apk)\n  which, although it's deprecated, is the most stable way of building rust\n  projects into android apps. It's configured in `mobile/Cargo.toml` and\n  calls the `android_main` function from the `mobile` crate.\n- iOS also uses the `mobile` crate but compiles is a library(using `cdylib`)\n  which is then called by an Objective-C file in `ios-src`. There's an XCode\n  project in `xilem_example_mobile.xcodeproj` that includes the required files\n  and which calls `build_rust_deps.sh` during build to compile the rust code.\n- There's a separate crate for the desktop build since cargo-apk fails if the\n  mobile project contains a binary target. It's a normal cargo project\n- The application logic is a separate project so that it can be imported\n  by both the mobile and desktop crates. It's based on the xilem mason example.\n\nThe setup should work with winit directly and would only require removing xilem\nfrom the app crate and instead creating the event loop and window directly.\n\n## References\n\n- https://github.com/bevyengine/bevy/tree/main/examples/mobile\n- https://github.com/ryanmcgrath/cacao/tree/trunk/examples/ios-beta\n- https://github.com/linebender/vello#android\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanholmerin%2Fxilem-cross-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohanholmerin%2Fxilem-cross-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanholmerin%2Fxilem-cross-platform/lists"}