Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xcode-rust-example

Xcode

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.

pre-reqs

  1. cargo
  2. xcode from Apple app store

Setup

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

  1. Run build.sh
  2. Open the Xcode project located at swiftyapp/swiftyapp.xcodeproj.
  3. Ensure that RustyLib was successfully imported into project.
  4. Build and run the project in Xcode.
  5. Verify that the Rust library functions are successfully called from the Swift project.

Referenced Articles:

About

Example of using UniFFI rust lib in xcode ios swift ui app.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages