Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a new binding for iOS -> Swift package #48

Merged
merged 4 commits into from
Apr 13, 2023

Conversation

michaelx11
Copy link
Contributor

Overview

The goal of this project is to ship Rust code in a format that iOS/MacOS can consume natively. This may help unblock React-Native efforts (see: issue).

Our strategy here is simple (credit to this blog post)

  • Build Rust code and target iOS/MacOS resulting in libraries ".a" files
  • Package those libraries into an XCFramework
  • Pair this with https://github.com/xmtp/xmtp-rust-swift - a thin repo that provides a Swift package interface wrapping the XCFramework
  • Consume xmtp-rust-swift via Swift Package Manager in xmtp-ios

Current Functionality

We can build xmtp-ios with xmtp-rust-swift via local XCFramework injection

Make-driven

  • builds
  • local XCFramework injection (or clean remote references if XCFramework bundle is hosted somewhere publicly)

Missing Functionality

Lots of room to refine the remote hosting flow. Ideally every build would put a temp object in an HTTPS accessible bucket and update the Package.swift in xmtp-rust-swift in a custom branch so devs can reference it.

@michaelx11 michaelx11 requested review from nakajima and neekolas April 13, 2023 18:33
Copy link
Contributor

@nakajima nakajima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so rad. Once it lands I'll try to get it all up and running over on my end too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants