docs/versions/6.5.0/reference/be/protocol-buffer.mdx
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.blacklisted_protos">
<code>blacklisted_protos</code>
</td>
<td>
<p><code>List of <a href="/versions/6.5.0/concepts/labels">labels</a>; optional</code></p>
No code will be generated for files in the <code>srcs</code> attribute of
<code>blacklisted_protos</code>.
This is used for .proto files that are already linked into proto runtimes, such as
<code>any.proto</code>.
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.command_line">
<code>command_line</code>
</td>
<td>
<p><code>String; required</code></p>
This value will be passed to proto-compiler to generate the code. Only include the parts
specific to this code-generator/plugin (e.g., do not include -I parameters)
<ul>
<li><code>$(OUT)</code> is LANG_proto_library-specific. The rules are expected to define
how they interpret this variable. For Java, for example, $(OUT) will be replaced with
the src-jar filename to create.</li>
</ul>
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.mnemonic">
<code>mnemonic</code>
</td>
<td>
<p><code>String; optional; default is "GenProto"</code></p>
This value will be set as the mnemonic on protoc action.
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.output_files">
<code>output_files</code>
</td>
<td>
<p><code>String; optional; default is "legacy"</code></p>
Controls how <code>$(OUT)</code> in <code>command_line</code> is formatted, either by
a path to a single file or output directory in case of multiple files.
Possible values are: "single", "multiple".
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.plugin">
<code>plugin</code>
</td>
<td>
<p><code><a href="/versions/6.5.0/concepts/labels">Label</a>; optional</code></p>
If provided, will be made available to the action that calls the proto-compiler, and will be
passed to the proto-compiler:
<code>--plugin=protoc-gen-PLUGIN=<executable>.</code>
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.plugin_format_flag">
<code>plugin_format_flag</code>
</td>
<td>
<p><code>String; optional</code></p>
If provided, this value will be passed to proto-compiler to use the plugin. The value must
contain a single %s which is replaced with plugin executable.
<code>--plugin=protoc-gen-PLUGIN=<executable>.</code>
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.progress_message">
<code>progress_message</code>
</td>
<td>
<p><code>String; optional; default is "Generating proto_library %{label}"</code></p>
This value will be set as the progress message on protoc action.
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.proto_compiler">
<code>proto_compiler</code>
</td>
<td>
<p><code><a href="/versions/6.5.0/concepts/labels">Label</a>; optional</code></p>
The proto compiler executable.
If provided, this target will be used as a proto-compiler to generate the code.
</td>
</tr>
<tr>
<td id="proto_lang_toolchain.runtime">
<code>runtime</code>
</td>
<td>
<p><code><a href="/versions/6.5.0/concepts/labels">Label</a>; optional</code></p>
A language-specific library that the generated code is compiled against.
The exact behavior is LANG_proto_library-specific.
Java, for example, should compile against the runtime.
</td>
</tr>
</tbody>
</td>
</tr>
<tr>
<td id="proto_library.deps">
<code>deps</code>
</td>
<td>
<p><code>List of <a href="/versions/6.5.0/concepts/labels">labels</a>; optional</code></p>
The list of other <code>proto_library</code> rules that the target depends upon.
A <code>proto_library</code> may only depend on other
<code>proto_library</code> targets.
It may not depend on language-specific libraries.
</td>
</tr>
<tr>
<td id="proto_library.srcs">
<code>srcs</code>
</td>
<td>
<p><code>List of <a href="/versions/6.5.0/concepts/labels">labels</a>; optional</code></p>
The list of <code>.proto</code> and <code>.protodevel</code> files that are
processed to create the target. This is usually a non empty list. One usecase
where <code>srcs</code> can be empty is an <i>alias-library</i>. This is a
proto_library rule having one or more other proto_library in <code>deps</code>.
This pattern can be used to e.g. export a public api under a persistent name.
</td>
</tr>
<tr>
<td id="proto_library.exports">
<code>exports</code>
</td>
<td>
<p><code>List of <a href="/versions/6.5.0/concepts/labels">labels</a>; optional</code></p>
List of proto_library targets that can be referenced via "import public" in the proto
source.
</td>
</tr>
<tr>
<td id="proto_library.import_prefix">
<code>import_prefix</code>
</td>
<td>
<p><code>String; optional</code></p>
The prefix to add to the paths of the .proto files in this rule.
<p>When set, the .proto source files in the <code>srcs</code> attribute of this rule are
accessible at is the value of this attribute prepended to their repository-relative path.
<p>The prefix in the <code>strip_import_prefix</code> attribute is removed before this
prefix is added.
</td>
</tr>
<tr>
<td id="proto_library.strip_import_prefix">
<code>strip_import_prefix</code>
</td>
<td>
<p><code>String; optional</code></p>
The prefix to strip from the paths of the .proto files in this rule.
<p>When set, .proto source files in the <code>srcs</code> attribute of this rule are
accessible at their path with this prefix cut off.
<p>If it's a relative path (not starting with a slash), it's taken as a package-relative
one. If it's an absolute one, it's understood as a repository-relative path.
<p>The prefix in the <code>import_prefix</code> attribute is added after this prefix is
stripped.
</td>
</tr>
</tbody>