Skip to content

Commit b5cfeeb

Browse files
Update anthropics and connectrpc (#2499)
### anthropics - buffa: v0.6.0 → v0.7.0 - connect-rust: v0.6.0 → v0.6.1 ### connectrpc - python: v0.10.0 → v0.10.1 Co-authored-by: app-token-plugins[bot] <app-token-plugins[bot]@users.noreply.github.com>
1 parent d7041fb commit b5cfeeb

15 files changed

Lines changed: 185 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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# syntax=docker/dockerfile:1.24
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+
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,target=/root/target \
7+
cargo install protoc-gen-buffa --version 0.7.0 --locked --root /app
8+
9+
FROM gcr.io/distroless/static-debian13:latest@sha256:3592aa8171c77482f62bbc4164e6a2d141c6122554ace66e5cc910cadb961ff0 AS base
10+
11+
FROM scratch
12+
COPY --link --from=base / /
13+
COPY --link --from=builder /app/bin/protoc-gen-buffa /protoc-gen-buffa
14+
USER nobody
15+
ENTRYPOINT ["/protoc-gen-buffa"]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: v1
2+
name: buf.build/anthropics/buffa
3+
plugin_version: v0.7.0
4+
source_url: https://github.com/anthropics/buffa
5+
description: Generates Rust message types with buffa, a zero-copy Protobuf implementation with editions support and no_std compatibility.
6+
output_languages:
7+
- rust
8+
spdx_license_id: Apache-2.0
9+
license_url: https://github.com/anthropics/buffa/blob/v0.7.0/LICENSE
10+
registry:
11+
cargo:
12+
rust_version: "1.85"
13+
deps:
14+
# Runtime: wire format, Message trait, view types, JSON helpers.
15+
# https://github.com/anthropics/buffa/blob/v0.7.0/buffa/Cargo.toml
16+
- name: "buffa"
17+
req: "0.7.0"
18+
default_features: true
19+
features:
20+
- json
21+
# Well-known types (Timestamp, Duration, Any, Struct, etc.).
22+
# Generated code references these via the auto-injected
23+
# extern_path mapping `.google.protobuf` -> `::buffa_types::google::protobuf`.
24+
- name: "buffa-types"
25+
req: "0.7.0"
26+
default_features: true
27+
features:
28+
- json
29+
- name: "buffa-descriptor"
30+
req: "0.7.0"
31+
default_features: true
32+
features:
33+
- json
34+
- views
35+
# Generated code derives `::serde::Serialize` / `::serde::Deserialize`
36+
# directly when json=true, so serde must be a direct dep.
37+
- name: "serde"
38+
req: "1"
39+
default_features: true
40+
features:
41+
- derive
42+
opts:
43+
# Enable serde derives + proto3 JSON mapping helpers. Required for
44+
# downstream plugins that need the Connect protocol's JSON codec.
45+
- json=true
46+
# Zero-copy view types. Default, but explicit for clarity.
47+
- views=true
48+
# Emit one `<dotted.package>.rs` per proto package instead of one
49+
# file per proto file. Matches the prost/tonic filename convention
50+
# the BSR Rust SDK lib.rs synthesis expects.
51+
- file_per_package=true
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.24
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.6.1 --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.6.1
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.7.0
8+
output_languages:
9+
- rust
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/anthropics/connect-rust/blob/v0.6.1/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.6.1/connectrpc/Cargo.toml
18+
- name: "connectrpc"
19+
req: "0.6.1"
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.1"
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.1"
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# syntax=docker/dockerfile:1.24
2+
FROM python:3.13.13-trixie@sha256:e6220f3ff717d352ea275569e0aea7a4d18e8cd681075ae195125969b0e163f4 AS build
3+
WORKDIR /app
4+
RUN python -mvenv /app
5+
RUN . ./bin/activate \
6+
&& pip install --no-cache-dir protoc-gen-connectrpc==0.10.1 \
7+
&& pip uninstall --yes pip setuptools \
8+
&& rm -f bin/activate.fish bin/activate.csh bin/Activate.ps1
9+
10+
FROM gcr.io/distroless/python3-debian13:latest@sha256:0e300647f5a9d51fb686e9167c97248e0419cd6e5186efc50b642748aab8d8be AS base
11+
12+
FROM scratch
13+
COPY --link --from=base / /
14+
COPY --link --from=build --chmod=0755 /app /app
15+
USER nobody
16+
ENTRYPOINT [ "/app/bin/protoc-gen-connectrpc" ]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: v1
2+
name: buf.build/connectrpc/python
3+
plugin_version: v0.10.1
4+
source_url: https://github.com/connectrpc/connect-python
5+
description: Generates client and server stubs for Connect Python. Compatible with the Connect RPC protocol.
6+
spdx_license_id: Apache-2.0
7+
license_url: https://github.com/connectrpc/connect-python/blob/v0.10.1/LICENSE
8+
deps:
9+
- plugin: buf.build/protocolbuffers/python:v35.0
10+
output_languages:
11+
- python
12+
registry:
13+
python:
14+
package_type: "runtime"
15+
# https://github.com/connectrpc/connect-python/blob/v0.10.1/pyproject.toml#L6
16+
requires_python: ">=3.10"
17+
deps:
18+
# https://pypi.org/project/connectrpc/
19+
- "connectrpc >= 0.10.1"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:nYqw3AXG7/uogG9uKS7uOELDkH+a2OhXqJM4vVQmUjk=

0 commit comments

Comments
 (0)