rustc <command>

CLI for rustc

Arguments

NameDescription
commandfilepaths

Options

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