Skip to main content

Rust

Whatโ€‹

Display the currently active rust version.

Sample Configurationโ€‹

{
"type": "rust",
"style": "powerline",
"powerline_symbol": "๎‚ฐ",
"foreground": "#193549",
"background": "#99908a",
"template": " ๎žจ {{ .Full }} "
}

Propertiesโ€‹

NameTypeDescription
home_enabledbooleandisplay the segment in the HOME folder or not - defaults to false
fetch_versionbooleandisplay the rust version (rustc --version) - defaults to true
missing_command_textstringtext to display when the command is missing - defaults to empty
display_modestring
  • always: the segment is always displayed
  • files: the segment is only displayed when *.rs, Cargo.toml or Cargo.lock files are present (default)

Template (info)โ€‹

default template
{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}

Propertiesโ€‹

NameTypeDescription
.Fullstringthe full version
.Majorstringmajor number
.Minorstringminor number
.Patchstringpatch number
.Prereleasestringchannel name
.Errorstringerror encountered when fetching the version string