-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuf.gen.yaml
More file actions
75 lines (74 loc) · 2.67 KB
/
Copy pathbuf.gen.yaml
File metadata and controls
75 lines (74 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# xtcp buf.gen.yaml
# https://buf.build/docs/configuration/v2/buf-gen-yaml/
#
# Plugins are LOCAL (nix-pinned binaries on PATH via nix/protos/buf-generate.nix),
# not buf.build remote plugins. This makes `nix run .#regen-protos` fully offline —
# no buf-cloud round-trip, so it can't be rate-limited. See docs/protobuf-formats.md.
# The plugin toolchain is pinned in nix/versions.nix.
#
version: v2
managed:
enabled: true
disable:
- module: buf.build/googleapis/googleapis
file_option: go_package_prefix
- file_option: go_package_prefix
module: buf.build/bufbuild/protovalidate
plugins:
#--------------------------
# Go — protoc-gen-go (nixpkgs: protoc-gen-go)
- local: protoc-gen-go
out: .
#--------------------------
# planetscale/vtprotobuf — reflection-free MarshalVT/SizeVT/UnmarshalVT.
# Runs after protoc-gen-go (emits *_vtproto.pb.go alongside *.pb.go). Used on
# the protobufList hot path; see pkg/recordfmt/marshal_envelope.go and
# pkg/xtcp/marshallers.go. (nixpkgs: protoc-gen-go-vtproto, v0.6.0)
- local: protoc-gen-go-vtproto
out: .
opt:
- features=marshal+unmarshal+size
#--------------------------
# Go gRPC — protoc-gen-go-grpc (nixpkgs: protoc-gen-go-grpc)
- local: protoc-gen-go-grpc
out: .
#--------------------------
# OpenAPI v2 (swagger) — protoc-gen-openapiv2 (nixpkgs: grpc-gateway)
- local: protoc-gen-openapiv2
out: gen/openapi
#--------------------------
# REST->gRPC gateway — protoc-gen-grpc-gateway (nixpkgs: grpc-gateway)
- local: protoc-gen-grpc-gateway
out: .
opt:
- generate_unbound_methods=true
#--------------------------
# Dart (Flutter) — protoc-gen-dart (nixpkgs: protoc-gen-dart)
- local: protoc-gen-dart
out: gen/dart
opt:
# gRPC stubs
- grpc
#--------------------------------
# Python — protoc builtins (--python_out / --pyi_out) + grpc_python_plugin
# (nixpkgs: protobuf provides protoc; grpc provides grpc_python_plugin)
- protoc_builtin: python
out: gen/python
- protoc_builtin: pyi
out: gen/python
- local: grpc_python_plugin
out: gen/python
#--------------------------------
# C++ — protoc builtin (--cpp_out) + grpc_cpp_plugin
# (nixpkgs: protobuf provides protoc; grpc provides grpc_cpp_plugin)
# NOTE: the bufbuild/validate-cpp plugin (protovalidate C++ codegen) has no
# nixpkgs equivalent and nothing in-repo consumes the C++ output, so it is
# intentionally dropped — C++ keeps message + gRPC codegen. Restore via a
# from-source protovalidate-cc build only if a real C++ consumer needs CEL
# validation.
- protoc_builtin: cpp
out: gen/cpp
- local: grpc_cpp_plugin
out: gen/cpp
# end