Contents

grpc/grpc-swift

This repository contains a gRPC implementation for Swift. You can read more

Quick Start

The following snippet contains a Swift Package manifest to use gRPC Swift v2.x with the SwiftNIO based transport and SwiftProtobuf serialization:

// swift-tools-version: 6.0
import PackageDescription

let package = Package(
    name: "Application",
    platforms: [.macOS("15.0")],
    dependencies: [
        .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"),
        .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"),
        .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"),
    ],
    targets: [
        .executableTarget(
            name: "Server",
            dependencies: [
                .product(name: "GRPCCore", package: "grpc-swift"),
                .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
                .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
            ]
        )
    ]
)

[gh-grpc]: https://github.com/grpc/grpc [grpcio]: https://grpc.io [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

Package Metadata

Repository: grpc/grpc-swift

Default branch: main

README: README.md