General Commands (v0.2.1)

Entry-point commands for help, version, and diagnostic explanations.

Latest

Overview

These commands are the top-level CLI entry points for getting help text, checking the compiler version, or reading a diagnostic explanation.

Reference source: thrustc/thrustc_cli/src/help.rs

Back to command line reference

-h

Show the compiler help message.

Aliases: --help

Accepts value: yes

Value syntax: optional help topic

Allowed values: opt, emit, print, code-model, reloc-model, sanitizer, symbol-linkage-strategy, denormal-floating-point-behavior, denormal-floating-point-32-bits-behavior

Details

Without an extra topic, this prints the full top-level command line help.

With a supported topic, it prints the focused help for that flag family instead of the generic overview.

Examples

thrustc --help
thrustc --help emit

Notes

-v

Print the compiler version and exit.

Aliases: --version

Accepts value: no

Details

This does not start a compilation pipeline. It only prints the current compiler version string.

Examples

thrustc --version

Notes

No extra notes for this flag.

--explain

Show the explanation for a compiler error or warning code.

Accepts value: yes

Value syntax: diagnostic code

Allowed values: E0001, W0001

Details

Use this when you already have a diagnostic code and want the longer explanation text.

The accepted value is a compiler issue code such as an error or warning identifier.

Examples

thrustc --explain E0001

Notes