Skip to content

Commit 7b7d80e

Browse files
committed
Reformat asciidoc man pages to markdown.
1 parent 5594bfa commit 7b7d80e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1947
-1676
lines changed

src/doc/man/cargo-bench.md

Lines changed: 61 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
= cargo-bench(1)
2-
:idprefix: cargo_bench_
3-
:doctype: manpage
4-
:actionverb: Benchmark
5-
:nouns: benchmarks
1+
# cargo-bench(1)
2+
{{*set actionverb="Benchmark"}}
3+
{{*set nouns="benchmarks"}}
64

7-
== NAME
5+
## NAME
86

97
cargo-bench - Execute benchmarks of a package
108

11-
== SYNOPSIS
9+
## SYNOPSIS
1210

13-
`cargo bench [_OPTIONS_] [BENCHNAME] [-- _BENCH-OPTIONS_]`
11+
`cargo bench` [_options_] [_benchname_] [`--` _bench-options_]
1412

15-
== DESCRIPTION
13+
## DESCRIPTION
1614

1715
Compile and execute benchmarks.
1816

19-
The benchmark filtering argument `BENCHNAME` and all the arguments following
17+
The benchmark filtering argument _benchname_ and all the arguments following
2018
the two dashes (`--`) are passed to the benchmark binaries and thus to
21-
_libtest_ (rustc's built in unit-test and micro-benchmarking framework). If
22-
you're passing arguments to both Cargo and the binary, the ones after `--` go
23-
to the binary, the ones before go to Cargo. For details about libtest's
24-
arguments see the output of `cargo bench \-- --help`. As an example, this will
19+
_libtest_ (rustc's built in unit-test and micro-benchmarking framework). If
20+
you are passing arguments to both Cargo and the binary, the ones after `--` go
21+
to the binary, the ones before go to Cargo. For details about libtest's
22+
arguments see the output of `cargo bench -- --help`. As an example, this will
2523
run only the benchmark named `foo` (and skip other similarly named benchmarks
2624
like `foobar`):
2725

@@ -36,27 +34,24 @@ The libtest harness may be disabled by setting `harness = false` in the target
3634
manifest settings, in which case your code will need to provide its own `main`
3735
function to handle running benchmarks.
3836

39-
4037
> **Note**: The
41-
> link:https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html[`#[bench\]` attribute]
38+
> [`#[bench]` attribute](https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html)
4239
> is currently unstable and only available on the
43-
> link:https://doc.rust-lang.org/book/appendix-07-nightly-rust.html[nightly channel].
40+
> [nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html).
4441
> There are some packages available on
45-
> link:https://crates.io/keywords/benchmark[crates.io] that may help with
42+
> [crates.io](https://crates.io/keywords/benchmark) that may help with
4643
> running benchmarks on the stable channel, such as
47-
> link:https://crates.io/crates/criterion[Criterion].
48-
49-
== OPTIONS
44+
> [Criterion](https://crates.io/crates/criterion).
5045
51-
=== Benchmark Options
46+
## OPTIONS
5247

53-
include::options-test.adoc[]
48+
### Benchmark Options
5449

55-
=== Package Selection
50+
{{> options-test }}
5651

57-
include::options-packages.adoc[]
52+
{{> section-package-selection }}
5853

59-
=== Target Selection
54+
### Target Selection
6055

6156
When no target selection options are given, `cargo bench` will build the
6257
following targets of the selected packages:
@@ -75,53 +70,65 @@ them from being benchmarked by default. Target selection options that take a
7570
target by name ignore the `bench` flag and will always benchmark the given
7671
target.
7772

78-
include::options-targets.adoc[]
73+
{{> options-targets }}
74+
75+
{{> section-features }}
7976

80-
include::options-features.adoc[]
77+
### Compilation Options
8178

82-
=== Compilation Options
79+
{{#options}}
8380

84-
include::options-target-triple.adoc[]
81+
{{> options-target-triple }}
8582

86-
=== Output Options
83+
{{/options}}
8784

88-
include::options-target-dir.adoc[]
85+
### Output Options
8986

90-
=== Display Options
87+
{{#options}}
88+
{{> options-target-dir }}
89+
{{/options}}
90+
91+
### Display Options
9192

9293
By default the Rust test harness hides output from benchmark execution to keep
9394
results readable. Benchmark output can be recovered (e.g., for debugging) by
9495
passing `--nocapture` to the benchmark binaries:
9596

9697
cargo bench -- --nocapture
9798

98-
include::options-display.adoc[]
99+
{{#options}}
100+
101+
{{> options-display }}
99102

100-
include::options-message-format.adoc[]
103+
{{> options-message-format }}
101104

102-
=== Manifest Options
105+
{{/options}}
103106

104-
include::options-manifest-path.adoc[]
107+
### Manifest Options
105108

106-
include::options-locked.adoc[]
109+
{{#options}}
110+
{{> options-manifest-path }}
107111

108-
=== Common Options
112+
{{> options-locked }}
113+
{{/options}}
109114

110-
include::options-common.adoc[]
115+
{{> section-options-common }}
111116

112-
=== Miscellaneous Options
117+
### Miscellaneous Options
113118

114119
The `--jobs` argument affects the building of the benchmark executable but
115120
does not affect how many threads are used when running the benchmarks. The
116121
Rust test harness runs benchmarks serially in a single thread.
117122

118-
include::options-jobs.adoc[]
123+
{{#options}}
124+
{{> options-jobs }}
125+
{{/options}}
119126

120-
== PROFILES
127+
## PROFILES
121128

122129
Profiles may be used to configure compiler options such as optimization levels
123130
and debug settings. See
124-
linkcargo:reference/profiles.html[the reference]
131+
[the reference](../reference/profiles.html)
125132
for more details.
126133

127134
Benchmarks are always built with the `bench` profile. Binary and lib targets
@@ -130,23 +137,23 @@ are built with the `release` profiles when linked to binaries and benchmarks.
130137
Dependencies use the `release` profile.
131138

132139
If you need a debug build of a benchmark, try building it with
133-
man:cargo-build[1] which will use the `test` profile which is by default
140+
{{man "cargo-build" 1}} which will use the `test` profile which is by default
134141
unoptimized and includes debug information. You can then run the debug-enabled
135142
benchmark manually.
136143

137-
include::section-environment.adoc[]
144+
{{> section-environment }}
138145

139-
include::section-exit-status.adoc[]
146+
{{> section-exit-status }}
140147

141-
== EXAMPLES
148+
## EXAMPLES
142149

143-
. Build and execute all the benchmarks of the current package:
150+
1. Build and execute all the benchmarks of the current package:
144151

145-
cargo bench
152+
cargo bench
146153

147-
. Run only a specific benchmark within a specific benchmark target:
154+
2. Run only a specific benchmark within a specific benchmark target:
148155

149-
cargo bench --bench bench_name -- modname::some_benchmark
156+
cargo bench --bench bench_name -- modname::some_benchmark
150157

151-
== SEE ALSO
152-
man:cargo[1], man:cargo-test[1]
158+
## SEE ALSO
159+
{{man "cargo" 1}}, {{man "cargo-test" 1}}

src/doc/man/cargo-build.md

Lines changed: 60 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,107 @@
1-
= cargo-build(1)
2-
:idprefix: cargo_build_
3-
:doctype: manpage
4-
:actionverb: Build
1+
# cargo-build(1)
2+
{{*set actionverb="Build"}}
53

6-
== NAME
4+
## NAME
75

86
cargo-build - Compile the current package
97

10-
== SYNOPSIS
8+
## SYNOPSIS
119

12-
`cargo build [_OPTIONS_]`
10+
`cargo build` [_options_]
1311

14-
== DESCRIPTION
12+
## DESCRIPTION
1513

1614
Compile local packages and all of their dependencies.
1715

18-
== OPTIONS
16+
## OPTIONS
1917

20-
=== Package Selection
18+
{{> section-package-selection }}
2119

22-
include::options-packages.adoc[]
23-
24-
=== Target Selection
20+
### Target Selection
2521

2622
When no target selection options are given, `cargo build` will build all
2723
binary and library targets of the selected packages. Binaries are skipped if
2824
they have `required-features` that are missing.
2925

30-
include::options-targets.adoc[]
26+
{{> options-targets }}
27+
28+
{{> section-features }}
29+
30+
### Compilation Options
31+
32+
{{#options}}
3133

32-
include::options-features.adoc[]
34+
{{> options-target-triple }}
3335

34-
=== Compilation Options
36+
{{> options-release }}
3537

36-
include::options-target-triple.adoc[]
38+
{{/options}}
3739

38-
include::options-release.adoc[]
40+
### Output Options
3941

40-
=== Output Options
42+
{{#options}}
43+
{{> options-target-dir }}
4144

42-
include::options-target-dir.adoc[]
45+
{{#option "`--out-dir` _directory_" }}
46+
Copy final artifacts to this directory.
4347

44-
*--out-dir* _DIRECTORY_::
45-
Copy final artifacts to this directory.
46-
+
4748
This option is unstable and available only on the
48-
link:https://doc.rust-lang.org/book/appendix-07-nightly-rust.html[nightly channel]
49+
[nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html)
4950
and requires the `-Z unstable-options` flag to enable.
5051
See https://github.com/rust-lang/cargo/issues/6790 for more information.
52+
{{/option}}
5153

52-
=== Display Options
54+
{{/options}}
5355

54-
include::options-display.adoc[]
56+
### Display Options
5557

56-
include::options-message-format.adoc[]
58+
{{#options}}
59+
{{> options-display }}
60+
61+
{{> options-message-format }}
62+
63+
{{#option "`--build-plan`" }}
64+
Outputs a series of JSON messages to stdout that indicate the commands to run
65+
the build.
5766

58-
*--build-plan*::
59-
Outputs a series of JSON messages to stdout that indicate the commands to
60-
run the build.
61-
+
6267
This option is unstable and available only on the
63-
link:https://doc.rust-lang.org/book/appendix-07-nightly-rust.html[nightly channel]
68+
[nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html)
6469
and requires the `-Z unstable-options` flag to enable.
65-
See https://github.com/rust-lang/cargo/issues/5579 for more information.
66-
67-
=== Manifest Options
70+
See <https://github.com/rust-lang/cargo/issues/5579> for more information.
71+
{{/option}}
72+
{{/options}}
6873

69-
include::options-manifest-path.adoc[]
74+
### Manifest Options
7075

71-
include::options-locked.adoc[]
76+
{{#options}}
77+
{{> options-manifest-path }}
7278

73-
=== Common Options
79+
{{> options-locked }}
80+
{{/options}}
7481

75-
include::options-common.adoc[]
82+
{{> section-options-common }}
7683

77-
=== Miscellaneous Options
84+
### Miscellaneous Options
7885

79-
include::options-jobs.adoc[]
86+
{{#options}}
87+
{{> options-jobs }}
88+
{{/options}}
8089

81-
include::section-profiles.adoc[]
90+
{{> section-profiles }}
8291

83-
include::section-environment.adoc[]
92+
{{> section-environment }}
8493

85-
include::section-exit-status.adoc[]
94+
{{> section-exit-status }}
8695

87-
== EXAMPLES
96+
## EXAMPLES
8897

89-
. Build the local package and all of its dependencies:
98+
1. Build the local package and all of its dependencies:
9099

91-
cargo build
100+
cargo build
92101

93-
. Build with optimizations:
102+
2. Build with optimizations:
94103

95-
cargo build --release
104+
cargo build --release
96105

97-
== SEE ALSO
98-
man:cargo[1], man:cargo-rustc[1]
106+
## SEE ALSO
107+
{{man "cargo" 1}}, {{man "cargo-rustc" 1}}

0 commit comments

Comments
 (0)