# chinedufn/swift-bridge

swift-bridge facilitates Rust and Swift interop.

Repository: https://github.com/chinedufn/swift-bridge
Canonical: https://ross.abutalabs.com/products/swift-bridge
Homepage: https://chinedufn.github.io/swift-bridge
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, swift, ffi, interop, ios
Last push: 2026-01-06T09:04:46+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 61, release rhythm 65, longevity 100
- inputs: {"age_days": 1753, "days_push": 239, "days_rel": 239, "gap_med": 30, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1123, forks 77 (observed 2026-08-28T04:03:40.437805+00:00)

## What it is
A Rust crate plus build-time code generator that produces FFI bindings so Rust and Swift can call each other's code safely. It bridges high-level types such as String, Option, Result, structs and classes, and supports async functions and generics without hand-written C glue.

## Use cases
- call Rust code from a Swift iOS app
- call Swift APIs from Rust
- generate FFI bindings between Rust and Swift
- share high-level types like String and Result across a Rust-Swift boundary
- embed a Rust core library into an iOS or macOS app
- replace hand-written C FFI glue with generated bindings

## When to choose
- You are building an iOS or macOS app with a Rust core and want safe, ergonomic bindings
- You need to pass rich types (Option, Result, structs, classes, async) across the Rust-Swift boundary
- You want build-time code generation via swift-bridge-build or the CLI instead of maintaining FFI manually

## When to avoid
- You need Rust interop with languages other than Swift, such as Kotlin or Java
- You require a 1.0-stable API or complete documentation, since the crate is still 0.1.x with a work-in-progress book
- You only need a thin, simple C-level FFI layer that you can maintain by hand

## Facets
- artifact type: library
- maturity: active
- function: sdk, build-tool, developer-tools
- domain: developer-tools, mobile-development, cross-platform, programming-languages
- platform: cross-platform, rust
- tags: ffi, bindings, interop, code-generation, swift, ios-apps, ios, macos

## Member repositories
- chinedufn/swift-bridge (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:40.437805+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:40:44.660072+00:00, confidence not recorded.
  - readme: https://github.com/chinedufn/swift-bridge (fetched 2026-08-28T04:03:40.437805+00:00, sha 8ac9f70a5b9b)
  - homepage: https://chinedufn.github.io/swift-bridge (fetched 2026-08-29T12:44:10.508214+00:00, sha 04d5b2265198)
  - registry_crates: https://crates.io/api/v1/crates/swift-bridge (fetched 2026-08-29T12:44:10.517597+00:00, sha e24341f4a93b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
