Skip to content

Commit a309fbc

Browse files
Update anthropics/connect-rust and grpc/swift-protobuf (#2477)
### anthropics - connect-rust: v0.4.2 → v0.5.0 ### grpc - swift-protobuf: v2.3.0 → v2.4.0
1 parent 9e3b8ef commit a309fbc

11 files changed

Lines changed: 162 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# syntax=docker/dockerfile:1.23
2+
FROM rust:1.95.0-alpine3.23@sha256:606fd313a0f49743ee2a7bd49a0914bab7deedb12791f3a846a34a4711db7ed2 AS builder
3+
RUN apk add --no-cache musl-dev
4+
WORKDIR /app
5+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
6+
# The protoc-gen-connect-rust binary is a [[bin]] target in the
7+
# connectrpc-codegen crate. cargo install compiles it by crate name.
8+
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,target=/root/target \
9+
cargo install connectrpc-codegen --version 0.5.0 --locked --root /app
10+
11+
FROM gcr.io/distroless/static-debian13:latest@sha256:3592aa8171c77482f62bbc4164e6a2d141c6122554ace66e5cc910cadb961ff0 AS base
12+
13+
FROM scratch
14+
COPY --link --from=base / /
15+
COPY --link --from=builder /app/bin/protoc-gen-connect-rust /protoc-gen-connect-rust
16+
USER nobody
17+
ENTRYPOINT ["/protoc-gen-connect-rust"]
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
version: v1
2+
name: buf.build/anthropics/connect-rust
3+
plugin_version: v0.5.0
4+
source_url: https://github.com/anthropics/connect-rust
5+
description: Generates ConnectRPC service traits, typed clients, and monomorphic dispatchers for Rust. Compatible with the Connect, gRPC, and gRPC-Web protocols. Passes the full ConnectRPC conformance suite.
6+
deps:
7+
- plugin: buf.build/anthropics/buffa:v0.6.0
8+
output_languages:
9+
- rust
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/anthropics/connect-rust/blob/v0.5.0/LICENSE
12+
registry:
13+
cargo:
14+
rust_version: "1.88"
15+
deps:
16+
# ConnectRPC runtime: Router, Context, ConnectError, client transports.
17+
# https://github.com/anthropics/connect-rust/blob/v0.5.0/connectrpc/Cargo.toml
18+
- name: "connectrpc"
19+
req: "0.5.0"
20+
default_features: true
21+
# Generated service stubs use buffa::Message, buffa::view::OwnedView,
22+
# buffa::bytes::Bytes directly. Message types live in the buffa SDK
23+
# crate (via the plugin dep above); this dep is for the runtime API.
24+
- name: "buffa"
25+
req: "0.6.0"
26+
default_features: true
27+
# Well-known types. Service stubs whose request/response types are
28+
# WKTs (e.g. google.longrunning.Operations) reference them as
29+
# `::buffa_types::google::protobuf::...`, mirroring buffa-codegen's
30+
# extern_path mapping for `.google.protobuf`. Must be a direct dep
31+
# so the `::buffa_types` path resolves in the generated crate.
32+
- name: "buffa-types"
33+
req: "0.6.0"
34+
default_features: true
35+
features:
36+
- json
37+
# Streaming method signatures use futures::Stream.
38+
- name: "futures"
39+
req: "0.3"
40+
default_features: true
41+
# Client transport bounds reference http_body::Body.
42+
- name: "http-body"
43+
req: "1"
44+
default_features: true
45+
# The plugin accepts `extern_path=.=<rust_path>` (or the shorthand
46+
# `buffa_module=<rust_path>`) to tell it where the buffa-generated message
47+
# types live. BSR should inject this based on the buffa dep's SDK crate
48+
# name, same as tonic receives extern_path for its prost dep. Leaving
49+
# it out here; please advise if an explicit entry is needed.
50+
opts:
51+
# Emit one `<dotted.package>.rs` per proto package, mirroring the
52+
# buffa plugin's `file_per_package=true` opt. Matches the
53+
# prost/tonic filename convention the BSR Rust SDK lib.rs
54+
# synthesis expects.
55+
- file_per_package
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!Dockerfile
3+
!Package.resolved
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# syntax=docker/dockerfile:1.23
2+
FROM swift:6.3.2-bookworm@sha256:40918972df286d15aa47f4686c98a211f0a6152ca1d48b3dbccd6f56a3c34815 AS build
3+
4+
RUN apt-get update \
5+
&& apt-get install -y unzip
6+
WORKDIR /app
7+
RUN git clone --depth 1 --branch 2.4.0 https://github.com/grpc/grpc-swift-protobuf --recursive
8+
WORKDIR /app/grpc-swift-protobuf
9+
COPY --link Package.resolved .
10+
RUN swift build -c release --static-swift-stdlib --product protoc-gen-grpc-swift-2 -Xlinker -s --force-resolved-versions
11+
12+
FROM gcr.io/distroless/cc-debian13:latest@sha256:8b5d1db6d2253036a53cb8362d3e3fa82a7caf84c247772c46a023166c64e977 AS base
13+
14+
FROM scratch
15+
COPY --link --from=base / /
16+
COPY --link --from=build /app/grpc-swift-protobuf/.build/release/protoc-gen-grpc-swift-2 .
17+
USER nobody
18+
ENTRYPOINT [ "/protoc-gen-grpc-swift-2" ]

‎plugins/grpc/swift-protobuf/v2.4.0/Package.resolved‎

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: v1
2+
name: buf.build/grpc/swift-protobuf
3+
plugin_version: v2.4.0
4+
source_url: https://github.com/grpc/grpc-swift-protobuf
5+
description: Generates Swift client and server stubs for the gRPC framework.
6+
deps:
7+
- plugin: buf.build/apple/swift:v1.38.0
8+
output_languages:
9+
- swift
10+
registry:
11+
swift:
12+
deps:
13+
- source: https://github.com/grpc/grpc-swift-protobuf.git
14+
package: grpc-swift-protobuf
15+
version: 2.4.0
16+
products:
17+
- GRPCProtobuf
18+
platforms:
19+
macos: v15
20+
ios: v18
21+
tvos: v18
22+
watchos: v11
23+
swift_versions:
24+
- .v6
25+
opts:
26+
- Visibility=Public
27+
- FileNaming=PathToUnderscores
28+
spdx_license_id: Apache-2.0
29+
license_url: https://github.com/grpc/grpc-swift-protobuf/blob/2.4.0/LICENSE
30+
integration_guide_url: https://swiftpackageindex.com/grpc/grpc-swift-protobuf/2.4.0/documentation/grpcprotobuf
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:mFkXt5wOM/CcvFH4VTw7NQp9Obws7Etqrxd3vp8A5LU=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:EpPCbq9Lb12JwHApK7tbAFbABQmCKVhyPh0kxCViZhY=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:H1L2+dsAzxe/ws+/A+IrA6i90XNPvCUzQ2XzLsRGfWI=

0 commit comments

Comments
 (0)