This repository contains Rust cryptography functions that can be used in Swift applications. The functions are compiled into a static library that can be linked to a Swift application.
To use the Rust cryptography functions in your Swift project, follow these steps:
- Clone the repository:
git clone https://github.com/coin-shuffle/crypto-bridge.git
- Build the Rust static library:
cd crypto-bridge
cargo lipo --release
- Copy the library to your Swift project:
cp target/universal/release/libcrypto.a /path/to/your/swift/project/
-
In your Xcode project, add the Rust library to the project by selecting "Add files to [project name]" from the "File" menu.
-
In your Swift code, import the Rust functions:
import crypto_bridge
- Call the Rust functions as needed.
- Rust version 1.50.0 or later.
- Xcode version 10.2 or later.
- iOS deployment target version 9.0 or later.
If you need more detailed instructions on how to use Rust in your iOS application, check out this tutorial provided by Mozilla. It covers the process of setting up Rust on iOS, creating a Rust static library, and integrating it into a Swift application.
This project is licensed under the Apache-2 License - see the LICENSE file for details.