Skip to content

Commit

Permalink
Added support for Swift 6 language mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bok- committed Jul 20, 2024
1 parent 35ce395 commit eb15faf
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.10
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down Expand Up @@ -43,21 +43,19 @@ let package = Package(
.product(name: "HummingbirdCore", package: "hummingbird"),
.product(name: "HummingbirdHTTP2", package: "hummingbird"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
]
),
.testTarget(
name: "CompatibilityTests",
dependencies: [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.target(name: "HummingbirdGRPC"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
]
),
],

swiftLanguageVersions: [
.v6,
]

)
63 changes: 63 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(

// MARK: - Package configuration

name: "hummingbird-grpc",

platforms: [
.iOS(.v17),
.macOS(.v14),
.tvOS(.v17)
],

// MARK: - Products

products: [
.library(name: "HummingbirdGRPC", targets: [ "HummingbirdGRPC" ]),
],


// MARK: - Source Dependencies

dependencies: [
.package(url: "https://github.com/unsignedapps/grpc-swift.git", from: "1.23.0"),
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.27.0"),
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.21.2"),
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0-rc.2"),
],


// MARK: - Targets

targets: [
.target(
name: "HummingbirdGRPC",
dependencies: [
.product(name: "GRPC", package: "grpc-swift"),
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "HummingbirdCore", package: "hummingbird"),
.product(name: "HummingbirdHTTP2", package: "hummingbird"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
]
),
.testTarget(
name: "CompatibilityTests",
dependencies: [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.target(name: "HummingbirdGRPC"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
]
),
]

)
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Hummingbird gRPC supports:
- grpc-swift generated server providers.
- proto2 and proto3.

>[!Note]
>From version 0.0.4 Hummingbird gRPC supports Swift 5.10+ and requires Hummingbird 2.0.0-rc.2 and grpc-swift 1.23.0+.
Hummingbird gRPC does not currently support:

- gRPC using JSON or other serialization formats.
Expand Down

0 comments on commit eb15faf

Please sign in to comment.