This repository is a Swift Package for distributing releases of the Matrix Rust SDK. It provides the Swift source code packaged in a format understood by the Swift package manager, and depends on a pre-compiled binary release of the underlying Rust code published from Matrix Rust SDK.
Whenever a new release of the underlying components is available, we need to tag a new release in this repo to make them available to Swift components. To do so we need to:
.xcframeworkbuild script from
.swiftfiles to this repository under
.xcframeworkto it's artefacts section
The package can be added to an Xcode project from a local checkout and the binary target can be configured by toggling the
useLocalBinary boolean. It might be necessary to manually add the resulting library to your project's
General/Frameworks, Libraries, and Embedded Content for it to work.
To build the package you will need the following installed:
cargo install uniffi_bindgen --version x.x.xwhere version needs to match the ones defined in the rust-sdk-ffi crate Cargo.toml.
rustup toolchain install nightly rustup default nightly rustup target add aarch64-apple-ios --toolchain nightly rustup target add aarch64-apple-darwin --toolchain nightly rustup target add aarch64-apple-ios-sim --toolchain nightly rustup target add x86_64-apple-ios --toolchain nightly rustup target add x86_64-apple-darwin --toolchain nightly
git clone https://github.com/matrix-org/matrix-rust-sdk
debug_build_xcframework.shscript, enable the