Skip to content

Commit d07bd5b

Browse files
committed
chore: cargo build-man
1 parent e8b6d97 commit d07bd5b

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

src/doc/man/generated_txt/cargo-package.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ DESCRIPTION
1414
following steps:
1515

1616
1. Load and check the current workspace, performing some basic checks.
17+
1718
o Path dependencies are not allowed unless they have a version key.
1819
Cargo will ignore the path key for dependencies in published
1920
packages. dev-dependencies do not have this restriction.
2021

2122
2. Create the compressed .crate file.
23+
2224
o The original Cargo.toml file is rewritten and normalized.
2325

2426
o [patch], [replace], and [workspace] sections are removed from the
@@ -32,7 +34,23 @@ DESCRIPTION
3234
about the current VCS checkout hash if available, as well as a
3335
flag if the worktree is dirty.
3436

37+
o Symlinks are flattened to their target files.
38+
39+
o Subdirectories containing Cargo.toml are excluded, as they are
40+
assumed to be separate packages.
41+
42+
o A target directory in the root of the package is excluded.
43+
44+
o Files and directories matching the [include] and [exclude] fields
45+
in the manifest are included or excluded. Include patterns can
46+
override the following rules.
47+
48+
o Files that are ignored by VCS are excluded.
49+
50+
o Unix hidden files and directories (starting with .) are excluded.
51+
3552
3. Extract the .crate file and build it to verify it can build.
53+
3654
o This will rebuild your package from scratch to ensure that it can
3755
be built from a pristine state. The --no-verify flag can be used
3856
to skip this step.

src/doc/src/commands/cargo-package.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ stored in the `target/package` directory. This performs the following steps:
2727
- A `.cargo_vcs_info.json` file is included that contains information
2828
about the current VCS checkout hash if available, as well as a flag if the
2929
worktree is dirty.
30+
- Symlinks are flattened to their target files.
31+
- Subdirectories containing `Cargo.toml` are excluded, as they are assumed
32+
to be separate packages.
33+
- A `target` directory in the root of the package is excluded.
34+
- Files and directories matching the `[include]` and `[exclude]` fields in
35+
the manifest are included or excluded. Include patterns can override the
36+
following rules.
37+
- Files that are ignored by VCS are excluded.
38+
- Unix hidden files and directories (starting with `.`) are excluded.
39+
3040
3. Extract the `.crate` file and build it to verify it can build.
3141
- This will rebuild your package from scratch to ensure that it can be
3242
built from a pristine state. The `--no-verify` flag can be used to skip

src/etc/man/cargo-package.1

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,33 @@ packaged lock file if the \fB\-\-locked\fR flag is used.
4545
about the current VCS checkout hash if available, as well as a flag if the
4646
worktree is dirty.
4747
.RE
48+
.sp
49+
.RS 4
50+
\h'-04'\(bu\h'+02'Symlinks are flattened to their target files.
51+
.RE
52+
.sp
53+
.RS 4
54+
\h'-04'\(bu\h'+02'Subdirectories containing \fBCargo.toml\fR are excluded, as they are assumed
55+
to be separate packages.
56+
.RE
57+
.sp
58+
.RS 4
59+
\h'-04'\(bu\h'+02'A \fBtarget\fR directory in the root of the package is excluded.
60+
.RE
61+
.sp
62+
.RS 4
63+
\h'-04'\(bu\h'+02'Files and directories matching the \fB[include]\fR and \fB[exclude]\fR fields in
64+
the manifest are included or excluded. Include patterns can override the
65+
following rules.
66+
.RE
67+
.sp
68+
.RS 4
69+
\h'-04'\(bu\h'+02'Files that are ignored by VCS are excluded.
70+
.RE
71+
.sp
72+
.RS 4
73+
\h'-04'\(bu\h'+02'Unix hidden files and directories (starting with \fB\&.\fR) are excluded.
74+
.RE
4875
.RE
4976
.sp
5077
.RS 4

0 commit comments

Comments
 (0)