Skip to content
Draft
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
4 changes: 4 additions & 0 deletions plugins/connectrpc/rust/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source:
github:
owner: anthropics
repository: connect-rust
2 changes: 2 additions & 0 deletions plugins/connectrpc/rust/v0.2.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.2.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# syntax=docker/dockerfile:1.19
FROM rust:1.91.1-alpine3.22 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.2.0 --locked --root /app

FROM gcr.io/distroless/static-debian12:latest@sha256:87bce11be0af225e4ca761c40babb06d6d559f5767fbf7dc3c47f0f1a466b92c 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"]
40 changes: 40 additions & 0 deletions plugins/connectrpc/rust/v0.2.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: v1
name: buf.build/connectrpc/rust
plugin_version: v0.2.0
source_url: https://github.com/anthropics/connect-rust
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.
deps:
- plugin: buf.build/community/anthropics-buffa:v0.2.0
output_languages:
- rust
spdx_license_id: Apache-2.0
license_url: https://github.com/anthropics/connect-rust/blob/v0.2.0/LICENSE
registry:
cargo:
rust_version: "1.85"
deps:
# ConnectRPC runtime: Router, Context, ConnectError, client transports.
# https://github.com/anthropics/connect-rust/blob/v0.2.0/connectrpc/Cargo.toml
- name: "connectrpc"
req: "0.2.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.2.0"
default_features: true
# 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
# opts empty here; please advise if an explicit entry is needed.
opts: []
Loading