Skip to content

Commit

Permalink
[ADD] swift5.10 manifest to prepare for the StrictConcurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
dioKaratzas committed Aug 13, 2024
1 parent bf1d306 commit 6bc506a
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ let package = Package(
.target(
name: "web3",
dependencies:
[
.target(name: "keccaktiny"),
.target(name: "aes"),
.target(name: "Internal_CryptoSwift_PBDKF2"),
.product(name: "BigInt", package: "BigInt"),
.product(name: "GenericJSON", package: "generic-json-swift"),
.product(name: "secp256k1", package: "secp256k1.swift"),
.product(name: "WebSocketKit", package: "websocket-kit"),
.product(name: "Logging", package: "swift-log")
],
[
.target(name: "keccaktiny"),
.target(name: "aes"),
.target(name: "Internal_CryptoSwift_PBDKF2"),
.product(name: "BigInt", package: "BigInt"),
.product(name: "GenericJSON", package: "generic-json-swift"),
.product(name: "secp256k1", package: "secp256k1.swift"),
.product(name: "WebSocketKit", package: "websocket-kit"),
.product(name: "Logging", package: "swift-log")
],
path: "Sources/Web3Swift"
),
.target(
.target(
name: "web3-zksync",
dependencies:
[
.target(name: "web3")
],
[
.target(name: "web3")
],
path: "Sources/Web3ZKSync"
),
.target(
Expand Down
89 changes: 89 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// swift-tools-version:5.10
import PackageDescription

let package = Package(
name: "web3.swift",
platforms: [
.iOS(SupportedPlatform.IOSVersion.v13),
.macOS(SupportedPlatform.MacOSVersion.v11),
.watchOS(.v7)
],
products: [
.library(name: "web3.swift", targets: ["web3"]),
.library(name: "web3-zksync.swift", targets: ["web3-zksync"])
],
dependencies: [
.package(url: "https://github.com/attaswift/BigInt", exact: "5.3.0"),
.package(url: "https://github.com/iwill/generic-json-swift", from: "2.0.0"),
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", from: "0.6.0"),
.package(url: "https://github.com/vapor/websocket-kit.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0")
],
targets: [
.target(
name: "web3",
dependencies:
[
.target(name: "keccaktiny"),
.target(name: "aes"),
.target(name: "Internal_CryptoSwift_PBDKF2"),
.product(name: "BigInt", package: "BigInt"),
.product(name: "GenericJSON", package: "generic-json-swift"),
.product(name: "secp256k1", package: "secp256k1.swift"),
.product(name: "WebSocketKit", package: "websocket-kit"),
.product(name: "Logging", package: "swift-log")
],
path: "Sources/Web3Swift",
swiftSettings: [
// .concurrencyChecking
]
),
.target(
name: "web3-zksync",
dependencies:
[
.target(name: "web3")
],
path: "Sources/Web3ZKSync",
swiftSettings: [
// .concurrencyChecking
]
),
.target(
name: "keccaktiny",
dependencies: [],
path: "libs/keccak-tiny",
exclude: ["module.map"]
),
.target(
name: "aes",
dependencies: [],
path: "libs/aes",
exclude: ["module.map"]
),
.target(
name: "Internal_CryptoSwift_PBDKF2",
dependencies: [],
path: "libs/CryptoSwift"
),
.testTarget(
name: "web3swiftTests",
dependencies: ["web3", "web3-zksync"],
path: "Tests/Web3SwiftTests",
resources: [
.copy("Resources/rlptests.json"),
.copy("Account/cryptofights_712.json"),
.copy("Account/ethermail_signTypedDataV4.json"),
.copy("Account/real_word_opensea_signTypedDataV4.json"),
]
)
]
)

extension SwiftSetting {
/// Enable complete concurrency checking for a target in a Swift package using Swift 5.9 or Swift 5.10
/// [Swift Concurrency Documentation](https://www.swift.org/documentation/concurrency/)
static var concurrencyChecking: SwiftSetting {
.enableExperimentalFeature("StrictConcurrency=complete")
}
}

0 comments on commit 6bc506a

Please sign in to comment.