-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Recently, I've been transforming some "old-style" binaries to XCFramework for the Apple platform. During my investigation, I found that most of the solutions are shell scripts with almost the same workflow. Of course, I've done the job similarly, but in the "script" style using Rust, as in the cargo-xtask way.
Afterwards, I'm considering contributing a cargo plugin to the community. Then, I came across this crate, and I have the same idea to build one like it.
The plan is to:
- Create a library crate
xcframeworkto standardize the related workflow: include build-target, merge platform binaries, wrap as a framework, verify and zip, which can be integrated into existing workflows, like the popular cargo-xtask method. - Based on the
xcframeworklibrary, build a user-friendly and one-step cargo plugin:cargo-xcframeworkexecutable.
Since "This is work in progress and is not ready for use", I'm willing to contribute together and push it to a release version.
Here's a roadmap I'm considering:
[ ] Extract(done already)xcframeworkas a library crate- support user-defined workflows.
-
support "cargo xtask` use case integrate
- example: add cargo-xtask usage #8
- Prepare core executions #10 - for user-define xtask
- Tweak all exist
cmdsto use core functions.- Encapsulate dynamic library into framework to fix Dynamic linking on iOS, watchOS, and tvOS requires the XCFramework to contain .framework bundles. #11
- ref: Technical Note TN2435: Embedding Frameworks In An App
- Use tuist to create ios example
- Encapsulate dynamic library into framework to fix Dynamic linking on iOS, watchOS, and tvOS requires the XCFramework to contain .framework bundles. #11
- Tweak all exist
-
Evolve configuration:
- Support standalone
xcframework.tomlconfig file together with[package.metadata.xcframework]table - Support
pre-buildhooks. e.g: to generate headers (.h) or module map files. - Support
custom-buildoptions. e.g: to allow running user-defined build jobs.
- Support standalone
-
- Build the
cargo-xcframeworkcargo plugin executable.- Support the cargo run command:
cargo xcframework. (just renamexcframeworktocargo-xcframework) by @akesson - Support flexible configuration sources, like the cargo-release method.
- Support the cargo run command:
- Add tests and examples. (note: use
tuist)- Static library build and integration.
- Dynamic library build and integration.
I'm working on this project, and I'll use this issue as a tracker.