blob: e9792f05e6a3902c9d57641584d39ab3fd4b56cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{{#options}}
{{#option "`--bin`" }}
Create a package with a binary target (`src/main.rs`).
This is the default behavior.
{{/option}}
{{#option "`--lib`" }}
Create a package with a library target (`src/lib.rs`).
{{/option}}
{{#option "`--edition` _edition_" }}
Specify the Rust edition to use. Default is 2021.
Possible values: 2015, 2018, 2021
{{/option}}
{{#option "`--name` _name_" }}
Set the package name. Defaults to the directory name.
{{/option}}
{{#option "`--vcs` _vcs_" }}
Initialize a new VCS repository for the given version control system (git,
hg, pijul, or fossil) or do not initialize any version control at all
(none). If not specified, defaults to `git` or the configuration value
`cargo-new.vcs`, or `none` if already inside a VCS repository.
{{/option}}
{{#option "`--registry` _registry_" }}
This sets the `publish` field in `Cargo.toml` to the given registry name
which will restrict publishing only to that registry.
Registry names are defined in [Cargo config files](../reference/config.html).
If not specified, the default registry defined by the `registry.default`
config key is used. If the default registry is not set and `--registry` is not
used, the `publish` field will not be set which means that publishing will not
be restricted.
{{/option}}
{{/options}}
|