kabiroberai / swift-sdk-darwin

Darwin Swift SDK for Linux (experimental)
MIT License
30 stars 1 forks source link

swift-sdk-darwin

SDKs for cross-compiling Darwin code on Linux.

Building

Prerequisites:

Steps:

  1. Download and install/extract Xcode 15.0 or higher
    • Use unxip to extract Xcode if you're on Linux.
  2. Run ./build.sh <linux host> [developer dir].
    • linux host: You can pass any Linux host for which a darwin-tools-linux release exists. e.g. ubuntu22.04-aarch64.
    • developer dir: this should be the path to Xcode.app/Contents/Developer. On macOS, you can omit this argument to let the script infer it.

Find the output at output/darwin.artifactbundle.

Installing

Prerequisites:

swift experimental-sdk install output/darwin.artifactbundle

Usage

swift build --experimental-swift-sdk arm64-apple-ios

TODO