Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion baseimages/Dockerfile.rust
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM rust:1.96.1-alpine3.23@sha256:14b9b5f47dcc6644d0f0c1b35a2c2c5d0124f67159aaee28a348627523459b55
FROM rust:1.96.1-alpine3.24@sha256:a41f7740f8b45d45795624eec13a8b42263cc700f19f7e4e86e04d3dda08a479

CMD echo this is a dummy file used to automate dependency upgrades for plugins
1 change: 1 addition & 0 deletions plugins/anthropics/connect-rust/v0.7.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ output_languages:
- rust
spdx_license_id: Apache-2.0
license_url: https://github.com/anthropics/connect-rust/blob/v0.7.0/LICENSE
deprecated: true
registry:
cargo:
rust_version: "1.88"
Expand Down
3 changes: 3 additions & 0 deletions plugins/connectrpc/rust/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source:
crates:
crate_name: connectrpc-codegen
2 changes: 2 additions & 0 deletions plugins/connectrpc/rust/v0.8.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
17 changes: 17 additions & 0 deletions plugins/connectrpc/rust/v0.8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# syntax=docker/dockerfile:1.24
FROM rust:1.96.1-alpine3.24@sha256:a41f7740f8b45d45795624eec13a8b42263cc700f19f7e4e86e04d3dda08a479 AS builder
RUN apk add --no-cache musl-dev
WORKDIR /app
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
# The protoc-gen-connect-rust binary is a [[bin]] target in the
# connectrpc-codegen crate. cargo install compiles it by crate name.
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,target=/root/target \
cargo install connectrpc-codegen --version 0.8.0 --locked --root /app

FROM gcr.io/distroless/static-debian13:latest@sha256:3592aa8171c77482f62bbc4164e6a2d141c6122554ace66e5cc910cadb961ff0 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=builder /app/bin/protoc-gen-connect-rust /protoc-gen-connect-rust
USER nobody
ENTRYPOINT ["/protoc-gen-connect-rust"]
55 changes: 55 additions & 0 deletions plugins/connectrpc/rust/v0.8.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: v1
name: buf.build/connectrpc/rust
plugin_version: v0.8.0
source_url: https://github.com/connectrpc/connect-rust
description: Generates ConnectRPC service traits, typed clients, and monomorphic dispatchers for Rust. Compatible with the Connect, gRPC, and gRPC-Web protocols.
deps:
- plugin: buf.build/anthropics/buffa:v0.8.1
output_languages:
- rust
spdx_license_id: Apache-2.0
license_url: https://github.com/connectrpc/connect-rust/blob/v0.8.0/LICENSE
registry:
cargo:
rust_version: "1.88"
deps:
# ConnectRPC runtime: Router, Context, ConnectError, client transports.
# https://github.com/connectrpc/connect-rust/blob/v0.8.0/connectrpc/Cargo.toml
- name: "connectrpc"
req: "0.8.0"
default_features: true
# Generated service stubs use buffa::Message, buffa::view::OwnedView,
# buffa::bytes::Bytes directly. Message types live in the buffa SDK
# crate (via the plugin dep above); this dep is for the runtime API.
- name: "buffa"
req: "0.8.1"
default_features: true
# Well-known types. Service stubs whose request/response types are
# WKTs (e.g. google.longrunning.Operations) reference them as
# `::buffa_types::google::protobuf::...`, mirroring buffa-codegen's
# extern_path mapping for `.google.protobuf`. Must be a direct dep
# so the `::buffa_types` path resolves in the generated crate.
- name: "buffa-types"
req: "0.8.1"
default_features: true
features:
- json
# Streaming method signatures use futures::Stream.
- name: "futures"
req: "0.3"
default_features: true
# Client transport bounds reference http_body::Body.
- name: "http-body"
req: "1"
default_features: true
# The plugin accepts `extern_path=.=<rust_path>` (or the shorthand
# `buffa_module=<rust_path>`) to tell it where the buffa-generated message
# types live. BSR should inject this based on the buffa dep's SDK crate
# name, same as tonic receives extern_path for its prost dep. Leaving
# it out here; please advise if an explicit entry is needed.
opts:
# Emit one `<dotted.package>.rs` per proto package, mirroring the
# buffa plugin's `file_per_package=true` opt. Matches the
# prost/tonic filename convention the BSR Rust SDK lib.rs
# synthesis expects.
- file_per_package
1 change: 1 addition & 0 deletions tests/plugins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ exec docker run --log-driver=none --rm -i {{.ImageName}}:{{.Version}} "$@"
// build time. The standalone test harness has no dep chain, so provide
// a placeholder catch-all mapping.
"buf.build/anthropics/connect-rust": {"extern_path=.=crate"},
"buf.build/connectrpc/rust": {"extern_path=.=crate"},
}
// Some plugins do not generate any code for the test protos, so we allow an empty plugin.sum file for these
// plugins. The format of the map is map[pluginName]map[image]bool, where the bool indicates whether an empty
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:QLUIhPVdSGhw2579QrDFYJHrubR+tyRjQoMOu+GVhnY=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:G23VgSBmPDKsPIJcoLEfAqEzZqtHuPV9K0D/rSa3OLs=
Loading