Skip to content

Commit f4562ba

Browse files
committed
Regenerate documentation
1 parent 6d0ea8e commit f4562ba

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

docs/src/rust_prost.md

+54
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,57 @@ Rust Prost toolchain rule.
192192
| <a id="rust_prost_toolchain-tonic_runtime"></a>tonic_runtime | The Tonic runtime crates to use. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
193193

194194

195+
<a id="rust_prost_transform"></a>
196+
197+
## rust_prost_transform
198+
199+
<pre>
200+
rust_prost_transform(<a href="#rust_prost_transform-name">name</a>, <a href="#rust_prost_transform-deps">deps</a>, <a href="#rust_prost_transform-srcs">srcs</a>, <a href="#rust_prost_transform-prost_opts">prost_opts</a>, <a href="#rust_prost_transform-tonic_opts">tonic_opts</a>)
201+
</pre>
202+
203+
A rule for transforming the outputs of `ProstGenProto` actions.
204+
205+
This rule is used by adding it to the `data` attribute of `proto_library` targets. E.g.
206+
```python
207+
load("@rules_proto//proto:defs.bzl", "proto_library")
208+
load("@rules_rust_prost//:defs.bzl", "rust_prost_library", "rust_prost_transform")
209+
210+
rust_prost_transform(
211+
name = "a_transform",
212+
srcs = [
213+
"a_src.rs",
214+
],
215+
)
216+
217+
proto_library(
218+
name = "a_proto",
219+
srcs = [
220+
"a.proto",
221+
],
222+
data = [
223+
":transform",
224+
],
225+
)
226+
227+
rust_prost_library(
228+
name = "a_rs_proto",
229+
proto = ":a_proto",
230+
)
231+
```
232+
233+
The `rust_prost_library` will spawn an action on the `a_proto` target which consumes the
234+
`a_transform` rule to provide a means of granularly modifying a proto library for `ProstGenProto`
235+
actions with minimal impact to other consumers.
236+
237+
**ATTRIBUTES**
238+
239+
240+
| Name | Description | Type | Mandatory | Default |
241+
| :------------- | :------------- | :------------- | :------------- | :------------- |
242+
| <a id="rust_prost_transform-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
243+
| <a id="rust_prost_transform-deps"></a>deps | Additional dependencies to add to the compiled crate. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
244+
| <a id="rust_prost_transform-srcs"></a>srcs | Additional source files to include in generated Prost source code. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
245+
| <a id="rust_prost_transform-prost_opts"></a>prost_opts | Additional options to add to Prost. | List of strings | optional | `[]` |
246+
| <a id="rust_prost_transform-tonic_opts"></a>tonic_opts | Additional options to add to Tonic. | List of strings | optional | `[]` |
247+
248+

0 commit comments

Comments
 (0)