id = "rustup" name = "rustup" homepage = "https://rustup.rs" description = "rustup is an installer for the systems programming language Rust." icon = "SimpleIcons:rust" executables = ["rustup"] [dotfiles] # https://rust-lang.github.io/rustup/configuration.html — rustup keeps a TOML # settings file at ${RUSTUP_HOME}/settings.toml, and RUSTUP_HOME defaults to # ~/.rustup (%USERPROFILE%\.rustup on Windows, which resolves to this same # path). This is a different tree from Cargo's ~/.cargo (apps/cargo.toml), # which holds no rustup state. paths = ["~/.rustup/settings.toml"] # Everything else under RUSTUP_HOME is downloaded toolchains and the # bookkeeping for them: gigabytes, all of it refetchable with # `rustup toolchain install`. exclude = [ "~/.rustup/toolchains/", "~/.rustup/downloads/", "~/.rustup/update-hashes/", "~/.rustup/tmp/", ] # rustup authenticates to nothing; the toolchain archives it fetches are # public. Registry tokens belong to Cargo and live in ~/.cargo/credentials.toml # (apps/cargo.toml). secret = [] # Read on each rustup/cargo/rustc shim invocation. side_effect = false # `overrides` is https://rust-lang.github.io/rustup/overrides.html's # per-directory overrides — "the per-directory overrides are stored in a # configuration file in rustup's home directory" — keyed by absolute paths to # checkouts on this machine. Those are the user's own working copies, so the # map is kept for rebuilding this machine and applied to no other. [[dotfiles.machine_lines]] file = "~/.rustup/settings.toml" match = { key_path = ["overrides"] } scope = "backup" # `default_toolchain` is written as a full descriptor including the host triple # ("stable-aarch64-apple-darwin"), so the value from a Mac names a toolchain a # Linux box cannot install — it is decided by the OS and the architecture and # by nothing else, which is why it is split off from the overrides above and # shared across that machine class instead. [[dotfiles.machine_lines]] file = "~/.rustup/settings.toml" match = { key_path = ["default_toolchain"] } scope = "platform" [commands] format = 1 label = "rustup" description = "Update toolchains, install toolchains and add targets." quality = "ai-draft" base = "fig:rustup" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/rustup.ts" license = "MIT" [[commands.subcommand]] path = ["update"] label = "Update toolchains" description = "Update Rust toolchains and rustup." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/rustup.ts" license = "MIT" [[commands.subcommand.field]] id = "toolchain" label = "Toolchains" type = "string" position = 0 multiple = true description = "Leave empty to update all installed toolchains." sources = ["fig"] [[commands.subcommand.field]] id = "no_self_update" label = "Skip rustup self-update" type = "boolean" option = ["--no-self-update"] sources = ["fig"] [[commands.subcommand.field]] id = "force" label = "Force update" type = "boolean" option = ["--force"] sources = ["fig"] [[commands.subcommand.task]] id = "update" label = "Update" fields = ["toolchain", "no_self_update"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["toolchain", "no_self_update"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["force"] [[commands.subcommand]] path = ["toolchain", "install"] label = "Install toolchain" description = "Install or update a toolchain." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/rustup.ts" license = "MIT" [[commands.subcommand.field]] id = "toolchain" label = "Toolchain" type = "string" position = 0 multiple = true suggestions = [{ value = "stable", label = "stable" }, { value = "beta", label = "beta" }, { value = "nightly", label = "nightly" }] sources = ["fig"] [[commands.subcommand.field]] id = "profile" label = "Profile" type = "string" option = ["--profile"] suggestions = [{ value = "minimal", label = "minimal" }, { value = "default", label = "default" }, { value = "complete", label = "complete" }] sources = ["fig"] [[commands.subcommand.field]] id = "component" label = "Components" type = "string" option = ["--component", "-c"] multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "target" label = "Targets" type = "string" option = ["--target", "-t"] multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "no_self_update" label = "Skip rustup self-update" type = "boolean" option = ["--no-self-update"] sources = ["fig"] [[commands.subcommand.field]] id = "force" label = "Force" type = "boolean" option = ["--force"] sources = ["fig"] [[commands.subcommand.task]] id = "install" label = "Install" fields = ["toolchain", "profile"] required = ["toolchain"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["toolchain", "profile", "component", "target"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["no_self_update", "force"] [[commands.subcommand]] path = ["target", "add"] label = "Add target" description = "Add a compilation target to a toolchain." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/rustup.ts" license = "MIT" [[commands.subcommand.field]] id = "target" label = "Target triple" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "toolchain" label = "Toolchain" type = "string" option = ["--toolchain"] suggestions = [{ value = "stable", label = "stable" }, { value = "beta", label = "beta" }, { value = "nightly", label = "nightly" }] sources = ["fig"] [[commands.subcommand.task]] id = "add" label = "Add target" fields = ["target", "toolchain"] required = ["target"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["target", "toolchain"]