|
| 1 | +Usage: rustc [OPTIONS] INPUT |
| 2 | + |
| 3 | +Options: |
| 4 | + -h, --help Display this message |
| 5 | + --cfg SPEC Configure the compilation environment. |
| 6 | + SPEC supports the syntax `NAME[="VALUE"]`. |
| 7 | + --check-cfg SPEC |
| 8 | + Provide list of expected cfgs for checking |
| 9 | + -L [KIND=]PATH Add a directory to the library search path. The |
| 10 | + optional KIND can be one of dependency, crate, native, |
| 11 | + framework, or all (the default). |
| 12 | + -l [KIND[:MODIFIERS]=]NAME[:RENAME] |
| 13 | + Link the generated crate(s) to the specified native |
| 14 | + library NAME. The optional KIND can be one of |
| 15 | + static, framework, or dylib (the default). |
| 16 | + Optional comma separated MODIFIERS |
| 17 | + (bundle|verbatim|whole-archive|as-needed) |
| 18 | + may be specified each with a prefix of either '+' to |
| 19 | + enable or '-' to disable. |
| 20 | + --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro] |
| 21 | + Comma separated list of types of crates |
| 22 | + for the compiler to emit |
| 23 | + --crate-name NAME |
| 24 | + Specify the name of the crate being built |
| 25 | + --edition 2015|2018|2021|2024 |
| 26 | + Specify which edition of the compiler to use when |
| 27 | + compiling code. The default is 2015 and the latest |
| 28 | + stable edition is 2021. |
| 29 | + --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir] |
| 30 | + Comma separated list of types of output for the |
| 31 | + compiler to emit |
| 32 | + --print [crate-name|file-names|sysroot|target-libdir|cfg|check-cfg|calling-conventions|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|all-target-specs-json|native-static-libs|stack-protector-strategies|link-args|deployment-target] |
| 33 | + Compiler information to print on stdout |
| 34 | + -g Equivalent to -C debuginfo=2 |
| 35 | + -O Equivalent to -C opt-level=2 |
| 36 | + -o FILENAME Write output to <filename> |
| 37 | + --out-dir DIR Write output to compiler-chosen filename in <dir> |
| 38 | + --explain OPT Provide a detailed explanation of an error message |
| 39 | + --test Build a test harness |
| 40 | + --target TARGET Target triple for which the code is compiled |
| 41 | + -A, --allow LINT Set lint allowed |
| 42 | + -W, --warn LINT Set lint warnings |
| 43 | + --force-warn LINT |
| 44 | + Set lint force-warn |
| 45 | + -D, --deny LINT Set lint denied |
| 46 | + -F, --forbid LINT Set lint forbidden |
| 47 | + --cap-lints LEVEL |
| 48 | + Set the most restrictive lint level. More restrictive |
| 49 | + lints are capped at this level |
| 50 | + -C, --codegen OPT[=VALUE] |
| 51 | + Set a codegen option |
| 52 | + -V, --version Print version info and exit |
| 53 | + -v, --verbose Use verbose output |
| 54 | + --extern NAME[=PATH] |
| 55 | + Specify where an external rust library is located |
| 56 | + --sysroot PATH Override the system root |
| 57 | + --error-format human|json|short |
| 58 | + How errors and other messages are produced |
| 59 | + --json CONFIG Configure the JSON output of the compiler |
| 60 | + --color auto|always|never |
| 61 | + Configure coloring of output: |
| 62 | + auto = colorize, if output goes to a tty (default); |
| 63 | + always = always colorize output; |
| 64 | + never = never colorize output |
| 65 | + --diagnostic-width WIDTH |
| 66 | + Inform rustc of the width of the output so that |
| 67 | + diagnostics can be truncated to fit |
| 68 | + --remap-path-prefix FROM=TO |
| 69 | + Remap source names in all output (compiler messages |
| 70 | + and output files) |
| 71 | + @path Read newline separated options from `path` |
| 72 | + |
| 73 | +Additional help: |
| 74 | + -C help Print codegen options |
| 75 | + -W help Print 'lint' options and default settings |
| 76 | + -Z help Print unstable compiler options |
| 77 | + |
0 commit comments