{"id":22030590,"url":"https://github.com/rustq/swiftui-skia","last_synced_at":"2026-02-21T03:23:57.051Z","repository":{"id":244532094,"uuid":"814778122","full_name":"rustq/swiftui-skia","owner":"rustq","description":"Skia based 2d graphics SwiftUI rendering library. It is based on Rust to implement software rasterization to perform rendering. 基于 Skia 的 2D 图形 SwiftUI 渲染库 —— 使用 Rust 语言实现纯软件光栅化渲染","archived":false,"fork":false,"pushed_at":"2024-09-10T14:58:41.000Z","size":796,"stargazers_count":43,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-23T14:42:18.009Z","etag":null,"topics":["rust","skia","swift","swiftui"],"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/rustq.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":"2024-06-13T17:25:44.000Z","updated_at":"2025-05-07T09:21:07.000Z","dependencies_parsed_at":"2024-06-15T12:46:13.435Z","dependency_job_id":"1983e280-92dc-4a27-a42c-99ca0fe6762c","html_url":"https://github.com/rustq/swiftui-skia","commit_stats":null,"previous_names":["rustq/swiftui-skia"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rustq/swiftui-skia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustq%2Fswiftui-skia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustq%2Fswiftui-skia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustq%2Fswiftui-skia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustq%2Fswiftui-skia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustq","download_url":"https://codeload.github.com/rustq/swiftui-skia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustq%2Fswiftui-skia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T03:11:15.450Z","status":"ssl_error","status_checked_at":"2026-02-21T03:10:34.920Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["rust","skia","swift","swiftui"],"created_at":"2024-11-30T08:02:34.857Z","updated_at":"2026-02-21T03:23:57.033Z","avatar_url":"https://github.com/rustq.png","language":"Swift","funding_links":[],"categories":["Libs"],"sub_categories":["UI"],"readme":"\u003cimg width=\"1440\" src=\"https://github.com/user-attachments/assets/a9ec1f8c-cfd0-4c4c-8219-4ba8292ee543\"\u003e\n\n# SwiftUI Skia\n\n[![license](https://img.shields.io/badge/license-MIT-cyan)](https://revolunet.mit-license.org/) [![crates](https://img.shields.io/crates/v/swiftui-skia)](https://crates.io/crates/swiftui-skia)\n\nThe `swiftui-skia` is a skia based 2d graphics `SwiftUI` rendering library. It is based on `Rust` to implement software rasterization to perform rendering. It performs better in cross-platform adaptability than hardware rasterization, however it is still an experimental project. And it's based entirely on `SwiftUI` syntax.\n\n基于 `Skia` 的 2D 图形 `SwiftUI` 渲染库 —— 使用 `Rust` 语言实现纯软件光栅化渲染，相比原生光栅化具有更好的跨平台适应性，不过目前仍然是一个实验项目；此外使用层面完全基于 `SwiftUI` 语法。\n\n## Usage\n\n```swift\nimport SwiftUI\nimport SwiftUISkia\n\nstruct ContentView: View {\n    var body: some View {\n        SwiftUISkia.Surface(width: 360, height: 360) {\n            SwiftUISkia.Rect(x: 10, y: 220, width: 30, height: 30, style: \"fill\", color: \"cyan\") {}\n            SwiftUISkia.Image(image: \"https://raw.githubusercontent.com/rustq/swiftui-skia/main/examples/first-example/first-example/Assets.xcassets/swiftui-96x96_2x.imageset/swiftui-96x96_2x.png\", x: 0, y: 0, width: 64, height: 64, blur: 5, brighten: 98) {}\n            SwiftUISkia.RoundRect(x: 220, y: 50, r: 10, width: 80, height: 80, style: \"stroke\", color: \"fuchsia\") {}\n            SwiftUISkia.Points(points: [\n                [138, 10],\n                [178, 90],\n                [266, 103],\n                [202, 165],\n                [217, 254],\n                [138, 212],\n                [59, 254],\n                [74, 165],\n                [10, 103],\n                [98, 90],\n            ], strokeWidth: 1, style: \"fill\", color: \"rgba(200, 255, 0, 0.7)\") {}\n            SwiftUISkia.Circle(cx: 200, cy: 220, r: 70, style: \"stroke\", color: \"violet\") {}\n            SwiftUISkia.Circle(cx: 200, cy: 220, r: 50, style: \"fill\", color: \"violet\") {}\n            SwiftUISkia.Text(text: \"Hello SwiftUI Skia!\",x: 80, y: 0, fontSize: 16, color: \"black\", maxWidth: 60) {}\n        }\n    }\n}\n```\n\n## Installation in Rust workspace\n\n```shell\n$ cargo add swiftui-skia\n```\n\n```shell\n$ cargo install --path .\n\n$ ln -s ~/.cargo/registry/src/index.crates.io-{YOUR CRATE HASH}/swiftui-skia-0.0.4 swiftui-skia\n```\n\n```shell\n$ cargo install cargo-lipo\n\n$ cargo install swift-bridge-cli\n```\n\n```shell\n$ cd swiftui-skia\n\n$ rustup target add x86_64-apple-darwin aarch64-apple-darwin aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim\n\n$ ./build-rust.sh\n\n$ ./build-bridge.sh\n```\n\n## Add Package Dependency\n\nFrameworks, Libraries, and Embedded Content\n\n△ SwiftUISkia\n\n△ SwiftUISkiaBridge\n\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustq%2Fswiftui-skia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustq%2Fswiftui-skia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustq%2Fswiftui-skia/lists"}