You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `bzl/` directory contains bazel skylark code that implements
2
+
protocol buffer generation for the supported languages. This file
3
+
lists attributes and behavior that is shared across all languages.
4
+
5
+
# `*_proto_compile` attributes
6
+
7
+
| Name | Type | Description | Default |
8
+
9
+
|`name`|`string`| The name of the rule (required) |`""`|
10
+
11
+
|`protos`|`label_list` of file type `.proto`| The set of protobuf source files to compile. Must not be empty. |`[]`|
12
+
13
+
|`proto_deps`|`label_list` having provider `proto`| A list of `*_proto_library` that the calling rule is dependent upon. |`[]`|
14
+
15
+
|`protoc`| executable `label`| Used to override the default protoc binary tool. |`//external:protoc`|
16
+
17
+
|`gen_{LANG}`|`boolean`| Enable/disable protobuf output on a language-specific basis. | Usually `True`|
18
+
19
+
|`gen_{LANG}_grpc`|`boolean`| Enable/disable gRPC output on a language-specific basis. |`False`|
20
+
21
+
|`gen_{LANG}_protobuf_binary`| executable `label`| Use to override the plugin executable on a language-specific basis. This attribute will not exist if this the language does not require a plugin for it. |*Implementation-specific*|
22
+
23
+
|`gen_{LANG}_protobuf_options`|`string_list`| Additional options to be bundled into to the `--{LANG}_out` argument. |`[]`|
24
+
25
+
|`gen_{LANG}_grpc_binary`| executable `label`| Use to override the grpc plugin executable on a language-specific basis. This attribute will not exist if this the language does support or require a plugin for this. |*Implementation-specific*|
26
+
27
+
|`gen_{LANG}_grpc_options`|`string_list`| Additional options to be bundled into to the `--grpc-{LANG}_out` argument. |`[]`|
28
+
29
+
|`outs`|`output_list`| Permits language implementation to specify additional implicit output targets. Currently only used by the java implementations which expose `%{name}.srcjar` as an implicit handle to the generated sourcefiles.` |`{}`|
30
+
31
+
|`output_to_workspace`|`boolean`| Under normal operation, generated code is placed in the bazel sandbox and does not need to be checked in into version control. However, your requirements may be such that is necessary to check these generated files in. Setting this flag to `True` will emit generated `*.pb.*` files into in your workspace alongside the `*.proto` source files. Please make sure you're sure you want to do this as it has the potential for unwanted overwrite of source files. |`False`|
32
+
33
+
34
+
# `*_proto_library` attributes
35
+
36
+
The attributes `protoc`, `protos`, `proto_deps`, `imports`,
37
+
`output_to_workspace`, `verbose`, `with_grpc` are included in all
38
+
`*_proto_library` rules, as described above.
39
+
40
+
| Name | Type | Description | Default |
41
+
42
+
|`name`|`string`| The name of the library rule (required). The implicit output target `%{name}.pb` refers to the corresponding proto_compile rule. |`""`|
43
+
|`proto_args`|`dict`| A dictionary of arguments to be passed to the `*_proto_compile` implementation. |`{}`|
44
+
|`srcs`|`label_list` of file type specific to library rule | Additional source files passed to the implementing library rule (for example, `cc_library`|`[]`|
45
+
|`deps`|`label_list` having provider specific to library rule | Additional dependencies passed to the implementing library rule (for example, `cc_library`|`[]`|
46
+
|`**kwargs`|`dict`| Additional extra arguments will be passed directly to the library rule implementation (for example, `cc_library`|`{}`|
0 commit comments