{
  "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": {
    "paths": [
      "~/.rustup/settings.toml"
    ],
    "exclude": [
      "~/.rustup/toolchains/",
      "~/.rustup/downloads/",
      "~/.rustup/update-hashes/",
      "~/.rustup/tmp/"
    ],
    "secret": [],
    "side_effect": false,
    "machine_lines": [
      {
        "file": "~/.rustup/settings.toml",
        "match": {
          "key_path": [
            "overrides"
          ]
        },
        "scope": "backup"
      },
      {
        "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
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/rustup.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "update"
        ],
        "label": "Update toolchains",
        "description": "Update Rust toolchains and rustup.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/rustup.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "toolchain",
            "label": "Toolchains",
            "type": "string",
            "position": 0,
            "multiple": true,
            "description": "Leave empty to update all installed toolchains.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_self_update",
            "label": "Skip rustup self-update",
            "type": "boolean",
            "option": [
              "--no-self-update"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "force",
            "label": "Force update",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "update",
            "label": "Update",
            "fields": [
              "toolchain",
              "no_self_update"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "toolchain",
              "no_self_update"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "force"
            ]
          }
        ]
      },
      {
        "path": [
          "toolchain",
          "install"
        ],
        "label": "Install toolchain",
        "description": "Install or update a toolchain.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/rustup.ts",
            "license": "MIT"
          }
        ],
        "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"
            ]
          },
          {
            "id": "profile",
            "label": "Profile",
            "type": "string",
            "option": [
              "--profile"
            ],
            "suggestions": [
              {
                "value": "minimal",
                "label": "minimal"
              },
              {
                "value": "default",
                "label": "default"
              },
              {
                "value": "complete",
                "label": "complete"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "component",
            "label": "Components",
            "type": "string",
            "option": [
              "--component",
              "-c"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target",
            "label": "Targets",
            "type": "string",
            "option": [
              "--target",
              "-t"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_self_update",
            "label": "Skip rustup self-update",
            "type": "boolean",
            "option": [
              "--no-self-update"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "force",
            "label": "Force",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "install",
            "label": "Install",
            "fields": [
              "toolchain",
              "profile"
            ],
            "required": [
              "toolchain"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "toolchain",
              "profile",
              "component",
              "target"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "no_self_update",
              "force"
            ]
          }
        ]
      },
      {
        "path": [
          "target",
          "add"
        ],
        "label": "Add target",
        "description": "Add a compilation target to a toolchain.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/rustup.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "target",
            "label": "Target triple",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "toolchain",
            "label": "Toolchain",
            "type": "string",
            "option": [
              "--toolchain"
            ],
            "suggestions": [
              {
                "value": "stable",
                "label": "stable"
              },
              {
                "value": "beta",
                "label": "beta"
              },
              {
                "value": "nightly",
                "label": "nightly"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "add",
            "label": "Add target",
            "fields": [
              "target",
              "toolchain"
            ],
            "required": [
              "target"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "target",
              "toolchain"
            ]
          }
        ]
      }
    ]
  }
}
