Skip to content

Commit 0303b89

Browse files
Update anthropics/buffa and mercari-grpc-federation (#2473)
### anthropics - buffa: v0.5.2 → v0.6.0 ### mercari-grpc-federation - v1.24.2 → v1.26.0
1 parent 2f120a1 commit 0303b89

11 files changed

Lines changed: 101 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.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+
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.6.0 --locked --root /app
8+
9+
FROM gcr.io/distroless/static-debian13:latest@sha256:47b2d72ff90843eb8a768b5c2f89b40741843b639d065b9b937b07cd59b479c6 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.6.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.6.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.6.0/buffa/Cargo.toml
16+
- name: "buffa"
17+
req: "0.6.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.6.0"
26+
default_features: true
27+
features:
28+
- json
29+
- name: "buffa-descriptor"
30+
req: "0.6.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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# syntax=docker/dockerfile:1.23
2+
FROM --platform=$BUILDPLATFORM golang:1.26.3-trixie@sha256:a085df697019cb63b40a70f6a92b948f7dc9df96dfcb2c20ba6eed25ce28f5b3 AS build
3+
4+
ARG TARGETOS TARGETARCH
5+
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
6+
7+
RUN --mount=type=cache,target=/go/pkg/mod \
8+
go install -ldflags="-s -w" -trimpath github.com/mercari/grpc-federation/cmd/protoc-gen-grpc-federation@v1.26.0 \
9+
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-federation /go/bin/protoc-gen-grpc-federation || true
10+
11+
FROM scratch
12+
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
13+
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-federation .
14+
ENV GOROOT /
15+
USER nobody
16+
ENTRYPOINT [ "/protoc-gen-grpc-federation" ]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: v1
2+
name: buf.build/community/mercari-grpc-federation
3+
plugin_version: v1.26.0
4+
source_url: https://github.com/mercari/grpc-federation
5+
integration_guide_url: https://github.com/mercari/grpc-federation/blob/main/docs/getting_started.md
6+
description: Generates a gRPC server by writing a custom option in Protocol Buffers
7+
output_languages:
8+
- go
9+
spdx_license_id: MIT
10+
license_url: https://github.com/mercari/grpc-federation/blob/v1.26.0/LICENSE
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:04EqbwhNoNF3pj4J9IZNBlPY8ZeNl3zNtTqa4No7nz0=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:KGEgYK5Tlu8VwV685pcPRF/lqSZaT3VMc6KEzl04xaw=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:sKQ69rbMl7tqnoqUK0HZ3YUzbL78WbLJUHNefMV8Z4U=

0 commit comments

Comments
 (0)