Demonstrates the ability to generate the necessary bindings for a rust lib compiled for an apple target to be embedded and called by a Swift project in Xcode.
- cargo
- xcode from Apple app store
rustylib rust library with two exposed functions
swiftyapp hello world ios app that imports and uses the two rust lib functions
swiftyrustlib Swift package of rust lib
- Run
build.sh - Open the Xcode project located at
swiftyapp/swiftyapp.xcodeproj. - Ensure that RustyLib was successfully imported into project.
- Build and run the project in Xcode.
- Verify that the Rust library functions are successfully called from the Swift project.
