Transaction Science open standards monorepo. Each subdirectory is a self-contained reference protocol with its own README and licence. - openpay/ Apache-2.0 payment-acceptance stack (Rust, 26 crates) - smart-byte/ CC-BY-4.0 content-addressed value carrier (spec) - eoc/ CC-BY-4.0 energy-optimised compute (spec) The wire format and the right to fork are public. The optional hosted services are the offer; the protocols are not.
57 lines
1.6 KiB
Swift
57 lines
1.6 KiB
Swift
// swift-tools-version:5.9
|
|
// OpenPay Swift Package — consumer-facing wrapper around the
|
|
// op-ffi-swift xcframework.
|
|
//
|
|
// Usage in your app's Package.swift:
|
|
//
|
|
// dependencies: [
|
|
// .package(path: "../openpay/crates/op-ffi-swift/swift")
|
|
// ],
|
|
// targets: [
|
|
// .target(
|
|
// name: "MyApp",
|
|
// dependencies: [.product(name: "OpenPay", package: "OpenPay")]
|
|
// )
|
|
// ]
|
|
//
|
|
// Or via SwiftPM directly:
|
|
//
|
|
// .package(url: "git@github.com:org/openpay.git", from: "0.7.0")
|
|
//
|
|
// The package vendors the prebuilt xcframework (produced by
|
|
// scripts/build-xcframework.sh) and the generated swift-bridge glue.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "OpenPay",
|
|
platforms: [
|
|
.iOS(.v15),
|
|
.macOS(.v12),
|
|
],
|
|
products: [
|
|
.library(
|
|
name: "OpenPay",
|
|
targets: ["OpenPay"]
|
|
),
|
|
],
|
|
targets: [
|
|
// Prebuilt Rust core as a binary target. The .xcframework is
|
|
// produced out of band by scripts/build-xcframework.sh and
|
|
// dropped into ../target/OpenPay.xcframework.
|
|
.binaryTarget(
|
|
name: "OpenPayRust",
|
|
path: "../target/OpenPay.xcframework"
|
|
),
|
|
// The Swift module that wraps the C ABI and re-exports the
|
|
// swift-bridge glue. Depends on the binary target for linkage.
|
|
.target(
|
|
name: "OpenPay",
|
|
dependencies: ["OpenPayRust"],
|
|
path: "OpenPay",
|
|
// The swift-bridge glue lives next to the wrapper; SwiftPM
|
|
// picks up the .swift, .h, and .modulemap automatically.
|
|
publicHeadersPath: "include"
|
|
),
|
|
]
|
|
)
|