Revision control
Copy as Markdown
// swift-tools-version: 5.10
import PackageDescription
let checksum = "1c743065572d1e34ea582a6425e1dc962c4dad3ae873ec61d30197c369a93dcb"
let version = "162.0.20261112215757"
// Focus xcframework
let focusChecksum = "dad910473f7f4fba9390898920bb9b78d62f152d07626df78c1271ea0b4ba104"
let package = Package(
name: "MozillaRustComponentsSwift",
platforms: [.iOS(.v15)],
products: [
.library(name: "MozillaRustComponents", targets: ["MozillaAppServices"]),
.library(name: "FocusRustComponents", targets: ["FocusAppServices"]),
],
dependencies: [
],
targets: [
// A wrapper around our binary target that combines + any swift files we want to expose to the user
.target(
name: "MozillaAppServices",
dependencies: [
"MozillaRustComponents", .product(name: "Glean", package: "glean-swift"),
],
path: "Sources/MozillaRustComponentsWrapper",
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
.unsafeFlags(["-enable-testing"]),
],
),
.target(
name: "FocusAppServices",
dependencies: [
.target(name: "FocusRustComponents", condition: .when(platforms: [.iOS]))
],
path: "Sources/FocusRustComponentsWrapper"
),
.binaryTarget(
name: "MozillaRustComponents",
//
// For release artifacts, reference the MozillaRustComponents as a URL with checksum.
// IMPORTANT: The checksum has to be on the line directly after the `url`
// this is important for our release script so that all values are updated correctly
url: url,
checksum: checksum
// For local testing, you can point at an (unzipped) XCFramework that's part of the repo.
// Note that you have to actually check it in and make a tag for it to work correctly.
//
//path: "./MozillaRustComponents.xcframework"
),
.binaryTarget(
name: "FocusRustComponents",
//
// For release artifacts, reference the MozillaRustComponents as a URL with checksum.
// IMPORTANT: The checksum has to be on the line directly after the `url`
// this is important for our release script so that all values are updated correctly
url: focusUrl,
checksum: focusChecksum
// For local testing, you can point at an (unzipped) XCFramework that's part of the repo.
// Note that you have to actually check it in and make a tag for it to work correctly.
//
//path: "./FocusRustComponents.xcframework"
),
// Tests
.testTarget(
name: "MozillaRustComponentsTests",
dependencies: ["MozillaAppServices"]
),
]
)