{"id":16687995,"url":"https://github.com/simlay/swift-rust-xcode-template","last_synced_at":"2025-09-10T04:33:25.792Z","repository":{"id":145355578,"uuid":"249291155","full_name":"simlay/swift-rust-xcode-template","owner":"simlay","description":"A cargo-generate template for generating ios-rust-swift apps.","archived":false,"fork":false,"pushed_at":"2020-03-25T06:43:06.000Z","size":18,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-17T01:06:22.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/simlay.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":"2020-03-22T23:20:10.000Z","updated_at":"2025-04-03T08:52:27.000Z","dependencies_parsed_at":"2023-04-21T23:35:10.078Z","dependency_job_id":null,"html_url":"https://github.com/simlay/swift-rust-xcode-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simlay/swift-rust-xcode-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simlay%2Fswift-rust-xcode-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simlay%2Fswift-rust-xcode-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simlay%2Fswift-rust-xcode-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simlay%2Fswift-rust-xcode-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simlay","download_url":"https://codeload.github.com/simlay/swift-rust-xcode-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simlay%2Fswift-rust-xcode-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263986258,"owners_count":23539809,"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":[],"created_at":"2024-10-12T15:26:21.442Z","updated_at":"2025-07-06T23:06:51.603Z","avatar_url":"https://github.com/simlay.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swift Rust Xcode Template\n\n[![Build Status](https://github.com/simlay/swift-rust-xcode-template/workflows/Template/badge.svg)](https://github.com/simlay/swift-rust-xcode-template/actions)\n\nThis is a template for quickly building an iOS app in rust and swift. It uses\n`cbindgen` to build `bindings.h` for convenient rust-swift interop.\n\nTo use this with [cargo-generate](https://github.com/ashleygwilliams/cargo-generate) do:\n```\ncargo generate --git https://github.com/simlay/swift-rust-xcode-template.git --name myproject\ncd myproject\n./rename.sh\n```\n\nThe `./rename.sh` step renames the xcode stuff to match your project name.\n\nTo build the rest of the app/project you'll need to run:\n* `cargo install cargo-lipo`\n* `rustup target add aarch64-apple-ios x86_64-apple-ios`\n\nAfter that you can build the app via the Xcode zoom-zoom-play button or run:\n`xcodebuild -target myproject -configuration Debug -scheme my-test-app -sdk iphonesimulator13.2`\n\nCurrently, there's some very rudimentary swift code that calls the rust with a\nclosure passed in. You can see that code\n[here](https://github.com/simlay/swift-rust-xcode-template/blob/74e90a61aa63dc7d2fac37b3a4f7cec17fd81171/swift-rust-xcode-template/AppDelegate.swift#L18-L29).\n\n\n## Template Maintenance\n\nAdding new things to this template is unfortunately annoying to add to or\nmaintain because of the template tags in\n`swift-rust-xcode-template.xcodeproj/project.pbxproj`, `rename.sh` and\n`Cargo.toml`. This project is open to other work flows but here's what seems\nlike the least worst option:\n\n```\ngit clone https://github.com/simlay/swift-rust-xcode-template\ncargo generate --git ./swift-rust-xcode-template --name update-swift-rust-xcode-template\ncd update-swift-rust-xcode-template\n./rename.sh\n```\n\nmodify your stuff and then `cp` the files back to the other directory.\n\nI'f you're doing a lot of things you may want to symlink the `src/lib.rs`,\n`swift-rust-xcode-template/*.swift`, etc. to the swift-rust-xcode-template\nrepo checkout.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimlay%2Fswift-rust-xcode-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimlay%2Fswift-rust-xcode-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimlay%2Fswift-rust-xcode-template/lists"}