{"repo":"chinedufn/swift-bridge","free":true,"listed":false,"github":"https://github.com/chinedufn/swift-bridge","clone":"git clone https://github.com/chinedufn/swift-bridge.git","description":"swift-bridge facilitates Rust and Swift interop.","language":"Rust","stars":1121,"topics":["rust","swift","ffi","interop","ios"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"swift-bridge swift-bridge facilitates Rust and Swift interop. swift-bridge makes it easy to pass and share high-level types between Rust and Swift, such as String , Option , Result , struct , class and more. It also helps you bridge higher level language features, such as async functions and generics. Using swift-bridge should be safer, more performant and more ergonomic than managing Rust and Swift FFI by hand. Installation Book You can find information about using Rust and Swift together in The swift-bridge Book. Quick Peek You use swift-bridge by declaring the types and functions that you want to import and export in a \"bridge module\", and then annotating that bridge module with the #[swift bridge::bridge] macro. Then, at build time, you use either the swift-bridge-build API or the swift-bridge-cli CLI to parse your annotated bridge modules and generate the Swift and C side of the FFI layer. Here's a quick peek at how you might describe an FFI boundary between Swift and Rust using a bridge module. Quick Start The swift-bridge repository contains example applications that you use to quickly try out the library, or as a starting point for your own Swift + Rust based application. For example, here's how to run the codegen-visualizer example project locally. --- You can find information about using Rust and Swift together in The swift-bridge Book. Built-In Types In addition to allowing you to share your own custom structs, enums and classes between Rust and Swift, swift-bridge","default_branch":null,"files":null,"tree":[],"storefront":"/r/chinedufn","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/chinedufn/swift-bridge/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}