diff --git a/Examples/echo/Package.swift b/Examples/echo/Package.swift index 4510456be..3792fcb04 100644 --- a/Examples/echo/Package.swift +++ b/Examples/echo/Package.swift @@ -21,6 +21,7 @@ let package = Package( name: "echo", platforms: [.macOS("15.0")], dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift", exact: "2.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", branch: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), @@ -29,6 +30,7 @@ let package = Package( .executableTarget( name: "echo", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "ArgumentParser", package: "swift-argument-parser"), diff --git a/Examples/hello-world/Package.swift b/Examples/hello-world/Package.swift index 52a9b349a..5437aa7dc 100644 --- a/Examples/hello-world/Package.swift +++ b/Examples/hello-world/Package.swift @@ -21,6 +21,7 @@ let package = Package( name: "hello-world", platforms: [.macOS("15.0")], dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift", exact: "2.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), @@ -29,6 +30,7 @@ let package = Package( .executableTarget( name: "hello-world", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "ArgumentParser", package: "swift-argument-parser"), diff --git a/Examples/hello-world/Sources/Subcommands/Greet.swift b/Examples/hello-world/Sources/Subcommands/Greet.swift index 64d405863..cd005534a 100644 --- a/Examples/hello-world/Sources/Subcommands/Greet.swift +++ b/Examples/hello-world/Sources/Subcommands/Greet.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 import GRPCProtobuf diff --git a/Examples/hello-world/Sources/Subcommands/Serve.swift b/Examples/hello-world/Sources/Subcommands/Serve.swift index ef5dc2935..d65483865 100644 --- a/Examples/hello-world/Sources/Subcommands/Serve.swift +++ b/Examples/hello-world/Sources/Subcommands/Serve.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 import GRPCProtobuf diff --git a/Examples/route-guide/Package.swift b/Examples/route-guide/Package.swift index 79e553920..7aba9a836 100644 --- a/Examples/route-guide/Package.swift +++ b/Examples/route-guide/Package.swift @@ -21,6 +21,7 @@ let package = Package( name: "route-guide", platforms: [.macOS("15.0")], dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift", exact: "2.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), @@ -29,6 +30,7 @@ let package = Package( .executableTarget( name: "route-guide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "ArgumentParser", package: "swift-argument-parser"), diff --git a/Examples/route-guide/Sources/Subcommands/GetFeature.swift b/Examples/route-guide/Sources/Subcommands/GetFeature.swift index 72ba1d1a4..890d432cd 100644 --- a/Examples/route-guide/Sources/Subcommands/GetFeature.swift +++ b/Examples/route-guide/Sources/Subcommands/GetFeature.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 struct GetFeature: AsyncParsableCommand { diff --git a/Examples/route-guide/Sources/Subcommands/ListFeatures.swift b/Examples/route-guide/Sources/Subcommands/ListFeatures.swift index 7e83add71..e2d1a5f5c 100644 --- a/Examples/route-guide/Sources/Subcommands/ListFeatures.swift +++ b/Examples/route-guide/Sources/Subcommands/ListFeatures.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 struct ListFeatures: AsyncParsableCommand { diff --git a/Examples/route-guide/Sources/Subcommands/RecordRoute.swift b/Examples/route-guide/Sources/Subcommands/RecordRoute.swift index 7cdf30cd2..e6d1611f1 100644 --- a/Examples/route-guide/Sources/Subcommands/RecordRoute.swift +++ b/Examples/route-guide/Sources/Subcommands/RecordRoute.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 struct RecordRoute: AsyncParsableCommand { diff --git a/Examples/route-guide/Sources/Subcommands/RouteChat.swift b/Examples/route-guide/Sources/Subcommands/RouteChat.swift index 3461e1f75..d25352662 100644 --- a/Examples/route-guide/Sources/Subcommands/RouteChat.swift +++ b/Examples/route-guide/Sources/Subcommands/RouteChat.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 struct RouteChat: AsyncParsableCommand { diff --git a/Examples/route-guide/Sources/Subcommands/Serve.swift b/Examples/route-guide/Sources/Subcommands/Serve.swift index c799b4fb7..8651346d4 100644 --- a/Examples/route-guide/Sources/Subcommands/Serve.swift +++ b/Examples/route-guide/Sources/Subcommands/Serve.swift @@ -16,6 +16,7 @@ import ArgumentParser import Foundation +import GRPCCore import GRPCNIOTransportHTTP2 import GRPCProtobuf import Synchronization diff --git a/README.md b/README.md index bc2c4d3cf..ea764d8e0 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ about gRPC on the [gRPC project's website][grpcio]. - [`grpc-swift-nio-transport`][grpc-swift-nio-transport] contains high-performance HTTP/2 client and server transport implementations for gRPC Swift built on top of SwiftNIO. - [`grpc-swift-protobuf`][grpc-swift-protobuf] contains integrations with SwiftProtobuf for gRPC Swift. - [`grpc-swift-extras`][grpc-swift-extras] contains optional extras for gRPC Swift. - + ## Quick Start @@ -32,6 +32,7 @@ let package = Package( name: "foo-package", platforms: [.macOS("15.0")], dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-alpha.1"), ], @@ -39,6 +40,7 @@ let package = Package( .executableTarget( name: "bar-target", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), ] @@ -52,4 +54,4 @@ let package = Package( [spi-grpc-swift]: https://swiftpackageindex.com/grpc/grpc-swift/documentation [grpc-swift-nio-transport]: https://github.com/grpc/grpc-swift-nio-transport [grpc-swift-protobuf]: https://github.com/grpc/grpc-swift-protobuf -[grpc-swift-extras]: https://github.com/grpc/grpc-swift-extras +[grpc-swift-extras]: https://github.com/grpc/grpc-swift-extras diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step08-description.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step08-description.swift index 09de19627..65a51d4b9 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step08-description.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step08-description.swift @@ -12,6 +12,7 @@ let package = Package( .executableTarget( name: "RouteGuide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), ] diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step00-package.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step00-package.swift index 09de19627..65a51d4b9 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step00-package.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step00-package.swift @@ -12,6 +12,7 @@ let package = Package( .executableTarget( name: "RouteGuide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), ] diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step01-package.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step01-package.swift index aac2037d5..e5f9b1088 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step01-package.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step01-package.swift @@ -12,6 +12,7 @@ let package = Package( .executableTarget( name: "RouteGuide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), ], diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step02-package.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step02-package.swift index 13c5b9816..1e8ef47e1 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step02-package.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step02-package.swift @@ -13,6 +13,7 @@ let package = Package( .executableTarget( name: "RouteGuide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "ArgumentParser", package: "swift-argument-parser"), diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step07-server.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step07-server.swift index a9797e762..a0ba287f4 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step07-server.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step07-server.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step08-run.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step08-run.swift index ac8280a58..6502dee78 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step08-run.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step08-run.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step02-add-run-client.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step02-add-run-client.swift index 55d8b69ee..15d650a6f 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step02-add-run-client.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step02-add-run-client.swift @@ -1,5 +1,3 @@ -import GRPCNIOTransportHTTP2 - extension RouteGuide { func runClient() async throws { } diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step03-create-client.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step03-create-client.swift index 445f09ede..ef8bc14ae 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step03-create-client.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step03-create-client.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step04-run-client.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step04-run-client.swift index c667bf626..f87f8cc80 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step04-run-client.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step04-run-client.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step05-stub.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step05-stub.swift index 6d4e9dc7e..15322b30f 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step05-stub.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step05-stub.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift index 4f7efb31c..04f75c699 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift index 22caf8eeb..adc6a25f4 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift index ab68b76c9..448eaa0ac 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift index fddc42966..12f75d83d 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial index ef4f3809f..2d9192efc 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial @@ -77,8 +77,9 @@ Next we can add a target. In this tutorial we'll create a single executable target which can act as both a client and a server. - We require two gRPC dependencies: `GRPCNIOTransportHTTP2"` provides an implementation of an HTTP/2 - client and server, while `GRPCProtobuf` provides the necessary components to serialize + We require three gRPC dependencies: `GRPCCore` provides core abstractions and runtime + components, `GRPCNIOTransportHTTP2` provides an implementation of an HTTP/2 + client and server, and `GRPCProtobuf` provides the necessary components to serialize and deserialize `SwiftProtobuf` messages. @Code(name: "Package.swift", file: "route-guide-sec01-step08-description.swift") diff --git a/Sources/GRPCInProcessTransport/Exports.swift b/Sources/GRPCInProcessTransport/Exports.swift deleted file mode 100644 index 1f32ac4d1..000000000 --- a/Sources/GRPCInProcessTransport/Exports.swift +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2024, gRPC Authors All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@_exported import GRPCCore