Revision control
Copy as Markdown
// swift-tools-version: 5.6
import PackageDescription
let checksum = "b685cb3a1431558dbbc41e98a7be1cca1603e0a839c331f1288eaa5549ea080e"
let version = "142.0.20250625050341"
// Focus xcframework
let focusChecksum = "6393d15bbb764a553add2c27e55f661dbe6f4763cfbf0f7b891db0803bd8d1c6"
let package = Package(
name: "MozillaRustComponentsSwift",
platforms: [.iOS(.v15)],
products: [
.library(name: "MozillaRustComponents", targets: ["MozillaAppServices"]),
],
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"
),
.target(
name: "FocusMozillaAppServices",
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"]
),
]
)