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
Suppose you have the following directory structure for a Rust library crate:
449
+
Suppose you have the following directory structure for a Rust library crate:
450
450
451
-
```
452
-
[workspace]/
453
-
WORKSPACE
454
-
hello_lib/
455
-
BUILD
456
-
src/
457
-
lib.rs
458
-
```
451
+
```
452
+
[workspace]/
453
+
WORKSPACE
454
+
hello_lib/
455
+
BUILD
456
+
src/
457
+
lib.rs
458
+
```
459
459
460
-
To build [`rustdoc`][rustdoc] documentation for the `hello_lib` crate, define a `rust_doc` rule that depends on the the `hello_lib``rust_library` target:
460
+
To build [`rustdoc`][rustdoc] documentation for the `hello_lib` crate, define a `rust_doc` rule that depends on the the `hello_lib``rust_library` target:
Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing the documentation for the `hello_lib` library crate generated by `rustdoc`.
480
+
Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing the documentation for the `hello_lib` library crate generated by `rustdoc`.
481
481
482
482
483
483
**ATTRIBUTES**
@@ -510,14 +510,14 @@ Suppose you have the following directory structure for a Rust library crate:
510
510
511
511
```output
512
512
[workspace]/
513
-
WORKSPACE
514
-
hello_lib/
515
-
BUILD
516
-
src/
517
-
lib.rs
513
+
WORKSPACE
514
+
hello_lib/
515
+
BUILD
516
+
src/
517
+
lib.rs
518
518
```
519
519
520
-
To run [documentation tests][doc-test] for the `hello_lib` crate, define a `rust_doc_test` target that depends on the `hello_lib``rust_library` target:
520
+
To run [documentation tests][doc-test] for the `hello_lib` crate, define a `rust_doc_test`target that depends on the `hello_lib``rust_library` target:
| <aid="rust_doc_test-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
549
-
| <aid="rust_doc_test-crate"></a>crate | The label of the target to generate code documentation for.<br><br><code>rust_doc_test</code> can generate HTML code documentation for the source files of <code>rust_library</code> or <code>rust_binary</code> targets. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
549
+
| <aid="rust_doc_test-crate"></a>crate | The label of the target to generate code documentation for.<code>rust_doc_test</code> can generate HTML code documentation for the source files of <code>rust_library</code> or <code>rust_binary</code> targets. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
Suppose you have the following directory structure for a Rust library crate:
18
+
Suppose you have the following directory structure for a Rust library crate:
19
19
20
-
```
21
-
[workspace]/
22
-
WORKSPACE
23
-
hello_lib/
24
-
BUILD
25
-
src/
26
-
lib.rs
27
-
```
20
+
```
21
+
[workspace]/
22
+
WORKSPACE
23
+
hello_lib/
24
+
BUILD
25
+
src/
26
+
lib.rs
27
+
```
28
28
29
-
To build [`rustdoc`][rustdoc] documentation for the `hello_lib` crate, define a `rust_doc` rule that depends on the the `hello_lib``rust_library` target:
29
+
To build [`rustdoc`][rustdoc] documentation for the `hello_lib` crate, define a `rust_doc` rule that depends on the the `hello_lib``rust_library` target:
Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing the documentation for the `hello_lib` library crate generated by `rustdoc`.
49
+
Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing the documentation for the `hello_lib` library crate generated by `rustdoc`.
50
50
51
51
52
52
**ATTRIBUTES**
@@ -79,14 +79,14 @@ Suppose you have the following directory structure for a Rust library crate:
79
79
80
80
```output
81
81
[workspace]/
82
-
WORKSPACE
83
-
hello_lib/
84
-
BUILD
85
-
src/
86
-
lib.rs
82
+
WORKSPACE
83
+
hello_lib/
84
+
BUILD
85
+
src/
86
+
lib.rs
87
87
```
88
88
89
-
To run [documentation tests][doc-test] for the `hello_lib` crate, define a `rust_doc_test` target that depends on the `hello_lib``rust_library` target:
89
+
To run [documentation tests][doc-test] for the `hello_lib` crate, define a `rust_doc_test`target that depends on the `hello_lib``rust_library` target:
| <aid="rust_doc_test-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
118
-
| <aid="rust_doc_test-crate"></a>crate | The label of the target to generate code documentation for.<br><br><code>rust_doc_test</code> can generate HTML code documentation for the source files of <code>rust_library</code> or <code>rust_binary</code> targets. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
118
+
| <aid="rust_doc_test-crate"></a>crate | The label of the target to generate code documentation for.<code>rust_doc_test</code> can generate HTML code documentation for the source files of <code>rust_library</code> or <code>rust_binary</code> targets. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
0 commit comments