{
  "id": "cargo",
  "name": "Cargo",
  "homepage": "https://doc.rust-lang.org/cargo/reference/config.html",
  "description": "Rust's package manager and build tool.",
  "icon": "SimpleIcons:rust",
  "executables": [
    "cargo"
  ],
  "dotfiles": {
    "paths": [
      "~/.cargo/config.toml",
      "~/.cargo/config"
    ],
    "exclude": [
      "~/.cargo/registry/",
      "~/.cargo/git/",
      "~/.cargo/bin/",
      "~/.cargo/.package-cache",
      "~/.cargo/.crates.toml",
      "~/.cargo/.crates2.json"
    ],
    "secret": [
      "~/.cargo/credentials.toml",
      "~/.cargo/credentials"
    ],
    "machine_lines": [
      {
        "file": "~/.cargo/config.toml",
        "match": {
          "key_path": [
            "paths",
            "build.target-dir"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Cargo",
    "description": "Build, test, run and create Rust packages. Other cargo commands (publish, install, doc, clippy) are left out.",
    "quality": "ai-draft",
    "base": "fig:cargo",
    "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/cargo.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "build"
        ],
        "label": "Build a package",
        "description": "Compile a local package and its dependencies.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/cargo.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "release",
            "label": "Release mode",
            "description": "Build artifacts in release mode, with optimizations.",
            "type": "boolean",
            "option": [
              "--release",
              "-r"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "package",
            "label": "Package",
            "description": "Package to build.",
            "type": "string",
            "option": [
              "--package",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "features",
            "label": "Features",
            "description": "Space or comma separated list of features to activate.",
            "type": "string",
            "option": [
              "--features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all_features",
            "label": "All features",
            "description": "Activate all available features.",
            "type": "boolean",
            "option": [
              "--all-features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_default_features",
            "label": "No default features",
            "description": "Do not activate the default feature.",
            "type": "boolean",
            "option": [
              "--no-default-features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "manifest_path",
            "label": "Manifest path",
            "description": "Path to Cargo.toml.",
            "type": "path",
            "option": [
              "--manifest-path"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "locked",
            "label": "Locked",
            "description": "Require Cargo.lock is up to date.",
            "type": "boolean",
            "option": [
              "--locked"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "offline",
            "label": "Offline",
            "description": "Run without accessing the network.",
            "type": "boolean",
            "option": [
              "--offline"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbosity",
            "description": "Use verbose output (-vv very verbose).",
            "type": "count",
            "option": [
              "--verbose",
              "-v"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspace",
            "label": "Whole workspace",
            "description": "Build all packages in the workspace.",
            "type": "boolean",
            "option": [
              "--workspace"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "lib",
            "label": "Library only",
            "description": "Build only this package's library.",
            "type": "boolean",
            "option": [
              "--lib"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "bin",
            "label": "Binary",
            "description": "Build only the specified binary.",
            "type": "string",
            "option": [
              "--bin"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target",
            "label": "Target triple",
            "description": "Build for the target triple.",
            "type": "string",
            "option": [
              "--target"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "release",
            "label": "Release build",
            "set": {
              "release": [
                true
              ]
            },
            "fields": [
              "release",
              "package",
              "workspace"
            ],
            "required": []
          },
          {
            "id": "workspace",
            "label": "Whole workspace",
            "set": {
              "workspace": [
                true
              ]
            },
            "fields": [
              "workspace",
              "release"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "release",
              "package",
              "workspace"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "features",
              "all_features",
              "no_default_features",
              "manifest_path",
              "locked",
              "offline",
              "verbose",
              "target",
              "lib",
              "bin"
            ]
          }
        ]
      },
      {
        "path": [
          "test"
        ],
        "label": "Run tests",
        "description": "Execute unit and integration tests. Arguments after -- go to the test harness and are not covered.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/cargo.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "testname",
            "label": "Test name filter",
            "description": "Only run tests whose name contains this string.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "release",
            "label": "Release mode",
            "description": "Build artifacts in release mode, with optimizations.",
            "type": "boolean",
            "option": [
              "--release",
              "-r"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "package",
            "label": "Package",
            "description": "Package to test.",
            "type": "string",
            "option": [
              "--package",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "features",
            "label": "Features",
            "description": "Space or comma separated list of features to activate.",
            "type": "string",
            "option": [
              "--features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all_features",
            "label": "All features",
            "description": "Activate all available features.",
            "type": "boolean",
            "option": [
              "--all-features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_default_features",
            "label": "No default features",
            "description": "Do not activate the default feature.",
            "type": "boolean",
            "option": [
              "--no-default-features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "manifest_path",
            "label": "Manifest path",
            "description": "Path to Cargo.toml.",
            "type": "path",
            "option": [
              "--manifest-path"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "locked",
            "label": "Locked",
            "description": "Require Cargo.lock is up to date.",
            "type": "boolean",
            "option": [
              "--locked"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "offline",
            "label": "Offline",
            "description": "Run without accessing the network.",
            "type": "boolean",
            "option": [
              "--offline"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbosity",
            "description": "Use verbose output (-vv very verbose).",
            "type": "count",
            "option": [
              "--verbose",
              "-v"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspace",
            "label": "Whole workspace",
            "description": "Test all packages in the workspace.",
            "type": "boolean",
            "option": [
              "--workspace"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "lib",
            "label": "Library tests only",
            "description": "Test only this package's library unit tests.",
            "type": "boolean",
            "option": [
              "--lib"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "doc",
            "label": "Doc tests only",
            "description": "Test only this library's documentation.",
            "type": "boolean",
            "option": [
              "--doc"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_run",
            "label": "Compile only",
            "description": "Compile, but don't run tests.",
            "type": "boolean",
            "option": [
              "--no-run"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_fail_fast",
            "label": "Keep going on failure",
            "description": "Run all tests regardless of failure.",
            "type": "boolean",
            "option": [
              "--no-fail-fast"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "all",
            "label": "Test the workspace",
            "set": {
              "workspace": [
                true
              ]
            },
            "fields": [
              "workspace",
              "no_fail_fast"
            ],
            "required": []
          },
          {
            "id": "one",
            "label": "Run matching tests",
            "fields": [
              "testname",
              "package"
            ],
            "required": [
              "testname"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "testname",
              "release",
              "package",
              "workspace",
              "lib",
              "doc",
              "no_run",
              "no_fail_fast"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "features",
              "all_features",
              "no_default_features",
              "manifest_path",
              "locked",
              "offline",
              "verbose"
            ]
          }
        ]
      },
      {
        "path": [
          "run"
        ],
        "label": "Run a binary",
        "description": "Build and run a binary or example. Program arguments after -- are not covered.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/cargo.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "bin",
            "label": "Binary",
            "description": "Name of the bin target to run.",
            "type": "string",
            "option": [
              "--bin"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "example",
            "label": "Example",
            "description": "Name of the example target to run.",
            "type": "string",
            "option": [
              "--example"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "release",
            "label": "Release mode",
            "description": "Build artifacts in release mode, with optimizations.",
            "type": "boolean",
            "option": [
              "--release",
              "-r"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "package",
            "label": "Package",
            "description": "Package to run.",
            "type": "string",
            "option": [
              "--package",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "features",
            "label": "Features",
            "description": "Space or comma separated list of features to activate.",
            "type": "string",
            "option": [
              "--features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all_features",
            "label": "All features",
            "description": "Activate all available features.",
            "type": "boolean",
            "option": [
              "--all-features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_default_features",
            "label": "No default features",
            "description": "Do not activate the default feature.",
            "type": "boolean",
            "option": [
              "--no-default-features"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "manifest_path",
            "label": "Manifest path",
            "description": "Path to Cargo.toml.",
            "type": "path",
            "option": [
              "--manifest-path"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "locked",
            "label": "Locked",
            "description": "Require Cargo.lock is up to date.",
            "type": "boolean",
            "option": [
              "--locked"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "offline",
            "label": "Offline",
            "description": "Run without accessing the network.",
            "type": "boolean",
            "option": [
              "--offline"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbosity",
            "description": "Use verbose output (-vv very verbose).",
            "type": "count",
            "option": [
              "--verbose",
              "-v"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "release",
            "label": "Run in release mode",
            "set": {
              "release": [
                true
              ]
            },
            "fields": [
              "bin",
              "release"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "bin",
              "example",
              "release",
              "package"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "features",
              "all_features",
              "no_default_features",
              "manifest_path",
              "locked",
              "offline",
              "verbose"
            ]
          }
        ]
      },
      {
        "path": [
          "new"
        ],
        "label": "New package",
        "description": "Create a new cargo package in a new directory.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/cargo.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "path",
            "label": "Directory",
            "description": "Directory to create.",
            "type": "path",
            "position": 0,
            "min": 1,
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "lib",
            "label": "Library",
            "description": "Use a library template.",
            "type": "boolean",
            "option": [
              "--lib"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "bin",
            "label": "Binary",
            "description": "Use a binary (application) template (default).",
            "type": "boolean",
            "option": [
              "--bin"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "name",
            "label": "Package name",
            "description": "Set the package name, defaults to the directory name.",
            "type": "string",
            "option": [
              "--name"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "edition",
            "label": "Edition",
            "description": "Edition to set for the crate generated.",
            "type": "string",
            "option": [
              "--edition"
            ],
            "suggestions": [
              {
                "value": "2015",
                "label": "2015"
              },
              {
                "value": "2018",
                "label": "2018"
              },
              {
                "value": "2021",
                "label": "2021"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "vcs",
            "label": "Version control",
            "description": "Initialize a new repository for the given version control system.",
            "type": "string",
            "option": [
              "--vcs"
            ],
            "suggestions": [
              {
                "value": "git",
                "label": "git"
              },
              {
                "value": "hg",
                "label": "hg"
              },
              {
                "value": "pijul",
                "label": "pijul"
              },
              {
                "value": "fossil",
                "label": "fossil"
              },
              {
                "value": "none",
                "label": "none"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "lib",
            "label": "New library",
            "set": {
              "lib": [
                true
              ]
            },
            "fields": [
              "path",
              "lib",
              "edition"
            ],
            "required": [
              "path"
            ]
          },
          {
            "id": "bin",
            "label": "New binary",
            "set": {
              "bin": [
                true
              ]
            },
            "fields": [
              "path",
              "bin",
              "edition"
            ],
            "required": [
              "path"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "path",
              "lib",
              "bin"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "name",
              "edition",
              "vcs"
            ]
          }
        ]
      }
    ]
  }
}
