-
Notifications
You must be signed in to change notification settings - Fork 23
Add anthropics/buffa plugin v0.3.0 #2333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iainmcgin
wants to merge
1
commit into
bufbuild:main
Choose a base branch
from
iainmcgin:add-buffa-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+61
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| source: | ||
| crates: | ||
| crate_name: protoc-gen-buffa | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * | ||
| !Dockerfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # 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 | ||
| RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,target=/root/target \ | ||
| cargo install protoc-gen-buffa --version 0.3.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-buffa /protoc-gen-buffa | ||
| USER nobody | ||
| ENTRYPOINT ["/protoc-gen-buffa"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| version: v1 | ||
| name: buf.build/anthropics/buffa | ||
| plugin_version: v0.3.0 | ||
| source_url: https://github.com/anthropics/buffa | ||
| description: Generates Rust message types with buffa, a zero-copy Protobuf implementation with editions support and no_std compatibility. | ||
| output_languages: | ||
| - rust | ||
| spdx_license_id: Apache-2.0 | ||
| license_url: https://github.com/anthropics/buffa/blob/v0.3.0/LICENSE | ||
| registry: | ||
| cargo: | ||
| rust_version: "1.85" | ||
| deps: | ||
| # Runtime: wire format, Message trait, view types, JSON helpers. | ||
| # https://github.com/anthropics/buffa/blob/v0.3.0/buffa/Cargo.toml | ||
| - name: "buffa" | ||
| req: "0.3.0" | ||
| default_features: true | ||
| features: | ||
| - json | ||
| # Well-known types (Timestamp, Duration, Any, Struct, etc.). | ||
| # Generated code references these via the auto-injected | ||
| # extern_path mapping `.google.protobuf` -> `::buffa_types::google::protobuf`. | ||
| - name: "buffa-types" | ||
| req: "0.3.0" | ||
| default_features: true | ||
| features: | ||
| - json | ||
| # Generated code derives `::serde::Serialize` / `::serde::Deserialize` | ||
| # directly when json=true, so serde must be a direct dep. | ||
| - name: "serde" | ||
| req: "1" | ||
| default_features: true | ||
| features: | ||
| - derive | ||
| opts: | ||
| # Enable serde derives + proto3 JSON mapping helpers. Required for | ||
| # downstream plugins that need the Connect protocol's JSON codec. | ||
| - json=true | ||
| # Zero-copy view types. Default, but explicit for clarity. | ||
| - views=true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's supposed to be a
cratessection here? See the prost plugin as an ezampleThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to crate ref instead of github ref 👍