cargo run --help

From wikieduonline
Revision as of 19:14, 28 May 2023 by Welcome (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Run a binary or example of the local package

Usage: cargo run [OPTIONS] [args]...

Arguments:
  [args]...  Arguments for the binary or example to run

Options:
  -q, --quiet                   Do not print cargo log messages
      --bin [<NAME>]            Name of the bin target to run
      --example [<NAME>]        Name of the example target to run
  -p, --package [<SPEC>]        Package with the target to run
  -v, --verbose...              Use verbose output (-vv very verbose/build.rs output)
  -j, --jobs <N>                Number of parallel jobs, defaults to # of CPUs
      --color <WHEN>            Coloring: auto, always, never
      --keep-going              Do not abort the build as soon as there is an error (unstable)
  -r, --release                 Build artifacts in release mode, with optimizations
      --frozen                  Require Cargo.lock and cache are up to date
      --profile <PROFILE-NAME>  Build artifacts with the specified profile
  -F, --features <FEATURES>     Space or comma separated list of features to activate
      --locked                  Require Cargo.lock is up to date
      --all-features            Activate all available features
      --offline                 Run without accessing the network
      --config <KEY=VALUE>      Override a configuration value
      --no-default-features     Do not activate the `default` feature
      --target <TRIPLE>         Build for the target triple
  -Z <FLAG>                     Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
      --target-dir <DIRECTORY>  Directory for all generated artifacts
      --manifest-path <PATH>    Path to Cargo.toml
      --message-format <FMT>    Error format
      --unit-graph              Output build graph in JSON (unstable)
      --ignore-rust-version     Ignore `rust-version` specification in packages
      --timings[=<FMTS>]        Timing output formats (unstable) (comma separated): html, json
  -h, --help                    Print help

Run `cargo help run` for more detailed information.


See also

Advertising: