rustc <filepath>

CLI for rustc




-h, --helpPrints out help info
--cfg <Spec>Configures compilation settings
-L [kind] <path>Adds a directory to the library search path
--l [kind] <Name>Links the generated crate to a native library
--crate-type <type>Specify types of crates for the compiler to emit
--crate-name <Name>Specify the name of the crate being built
--edition <edition>Specify the edition to use
--emit <type>Specify the types of output files to generate
--print <type>Prints compiler info
-gSynonym for -C debuginfo=2
-OSynonym for -C opt-level=2
-o <filename>Specify the filename to write output
--out-dir <dir>Specify directory to write output
--explain <Error Code>Provides a detailed explanation of an error message
--testBuilds a test harness
--target <Target>Selects a target triple to build
-W, --warn <OPT>Sets lint warnings
-A, --allow <OPT>Set lint allowed
-D, --deny <OPT>Set lint denied
-F, --forbid <Opt>Set lint forbid
--cap-lints <Level>Set the most restrictive lint level
-C, --codegen <option>Set a codegen option
-Z <option>Set unstable options
-V, --versionPrints version
-v, --verboseUse verbose output
--extern <Path>Specify where an external library is located
--sysroot <directory>
  • Dangerous 💥
--error-format <format>Controls how errors are produced
--color <color>Configures coloring of output