Skip to content

Commit 8a0612b

Browse files
Update anthropics/buffa (#2571)
### anthropics - buffa: v0.7.1 → v0.8.0
1 parent f324418 commit 8a0612b

5 files changed

Lines changed: 74 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.96.0-alpine3.23@sha256:5dc2af9dd547c33f64d5fc1d299ab93b51f39eaa16c426c476b990ce6caf5b3e 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.8.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: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
version: v1
2+
name: buf.build/anthropics/buffa
3+
plugin_version: v0.8.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.8.0/LICENSE
10+
registry:
11+
cargo:
12+
rust_version: "1.75" # https://github.com/anthropics/buffa/blob/v0.8.0/Cargo.toml#L35
13+
deps:
14+
# Runtime: wire format, Message trait, view types, JSON helpers.
15+
# https://github.com/anthropics/buffa/blob/v0.8.0/buffa/Cargo.toml
16+
- name: "buffa"
17+
req: "0.8.0"
18+
default_features: true
19+
features:
20+
- json
21+
- text
22+
# Well-known types (Timestamp, Duration, Any, Struct, etc.).
23+
# Generated code references these via the auto-injected
24+
# extern_path mapping `.google.protobuf` -> `::buffa_types::google::protobuf`.
25+
- name: "buffa-types"
26+
req: "0.8.0"
27+
default_features: true
28+
features:
29+
- json
30+
- name: "buffa-descriptor"
31+
req: "0.8.0"
32+
default_features: true
33+
features:
34+
- json
35+
- views
36+
- text
37+
# Generated code derives `::serde::Serialize` / `::serde::Deserialize`
38+
# directly when json=true, so serde must be a direct dep.
39+
- name: "serde"
40+
req: "1"
41+
default_features: true
42+
features:
43+
- derive
44+
opts:
45+
# Enable serde derives + proto3 JSON mapping helpers. Required for
46+
# downstream plugins that need the Connect protocol's JSON codec.
47+
- json=true
48+
# Enable textproto encoding/decoding.
49+
- text=true
50+
# Zero-copy view types. Default, but explicit for clarity.
51+
- views=true
52+
# Emit one `<dotted.package>.rs` per proto package instead of one
53+
# file per proto file. Matches the prost/tonic filename convention
54+
# the BSR Rust SDK lib.rs synthesis expects.
55+
- file_per_package=true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:5vXxpiByArtaI1/hOZnjCT31tGCj3pHM1HEZuaMkxTI=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:MChVxS+MS7i/0g93b+0p+jFzICM72NSkCg3UMdsJng8=

0 commit comments

Comments
 (0)