Revision control

Copy as Markdown

// swift-tools-version: 5.6
import PackageDescription
let checksum = "377073bcef808ce6a64d68be00822a6743954c48b8c2f5ec8a032979d7daa526"
let version = "144.0.20250905050321"
// Focus xcframework
let focusChecksum = "b60d96986fd5915f958face28fc9d3f1cde1ca0dcbb81f511c48273ec3289a09"
let package = Package(
name: "MozillaRustComponentsSwift",
platforms: [.iOS(.v15)],
products: [
.library(name: "MozillaRustComponents", targets: ["MozillaAppServices"]),
.library(name: "FocusRustComponents", targets: ["FocusAppServices"]),
],
dependencies: [
.package(url: "https://github.com/mozilla/glean-swift", from: "65.0.3"),
],
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"
),
.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"]
),
]
)