跳到正文
cccskills
免费在 GitHub 公开

cargo

Use this reference to work with Cargo, Rust’s package manager and build tool. It explains project manifests, dependencies, features, workspaces, build profiles, configuration, registries, publishing, and commands for building, testing, and inspecting projects.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Use when working with the cargo CLI — Rust's package manager. Covers the manifest format (Cargo.toml), dependencies, features, workspaces, build profiles, build scripts, configuration (.cargo/config.toml), registries and publishing, environment variables, the lockfile and cache, and the command reference. Triggers on: "cargo", "cargo build", "cargo check", "cargo test", "cargo run", "cargo add", "cargo update", "cargo publish", "cargo new", "cargo init", "cargo install", "cargo doc", "cargo bench", "cargo tree", "cargo metadata", "Cargo.toml", "Cargo.lock", "crate", "workspace", "feature", "profile", "build script", "build.rs", "registry", "crates.io", "CARGO_HOME", "rustc", "rustdoc", "rust-version", "edition".

carapace-sh/carapace-bin星标 2,000(GitHub 2,000 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • Setting up dependencies in Cargo.toml
  • Understanding features and workspace settings
  • Choosing Cargo commands to build or test a project
  • Checking registry, publishing, or lockfile behavior

包含的文件(13)

  • SKILL.md9.8 KB
  • references/build-scripts.md8.9 KB
  • references/commands.md18.7 KB
  • references/concepts.md9.5 KB
  • references/config.md12.5 KB
  • references/dependencies.md8.3 KB
  • references/environment.md7.7 KB
  • references/features.md9.5 KB
  • references/lockfile.md9.0 KB
  • references/manifest.md9.4 KB
  • references/profiles.md8.0 KB
  • references/registries.md10.4 KB
  • references/workspaces.md5.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Cargo — Rust's Package Manager In-Depth Reference

Comprehensive reference for the cargo CLI (https://doc.rust-lang.org/cargo/), covering the manifest format, dependency specification, the features system and resolver, workspaces, build profiles, build scripts, configuration, registries and publishing, environment variables, the lockfile and cache layout, and the full command reference.

Data Flow

Cargo.toml (manifest)
  → dependency resolver (registry index + Cargo.lock)
    → fetch (registry cache / git / path / vendor)
      → build scripts (build.rs, OUT_DIR)
        → rustc / rustdoc (per profile, per target)
          → target/<profile>/  (artifacts)
            → run / test / bench / install

Sub-Resources

Load the reference that matches your task. When in doubt, load multiple references.

KeywordsReference
concept, package, crate, target, binary, library, example, test, bench, edition, registry, Cargo.toml, Cargo.lock, cargo home, build pipeline, crate types, cdylib, rlib, dylib, staticlib, proc-macro, target triple, host vs target, cross-compilation, manifest vs lockfilereferences/concepts.md
manifest, Cargo.toml, [package], name, version, edition, rust-version, authors, description, license, license-file, keywords, categories, readme, homepage, repository, documentation, metadata, publish, include, exclude, build, links, default-run, resolver, autolib, autobins, autoexamples, autotests, autobenches, [lib], [[bin]], [[example]], [[test]], [[bench]], crate-type, required-features, doctest, [lints], [badges], cargo-featuresreferences/manifest.md
dependency, [dependencies], [dev-dependencies], [build-dependencies], [target.*.dependencies], version requirement, SemVer, caret requirement, tilde requirement, wildcard, git dependency, branch, tag, rev, path dependency, registry dependency, optional dependency, default-features, features, rename, package, workspace dependency, dependency inheritance, platform-specific, cfg expressionreferences/dependencies.md
feature, [features], default, dep: syntax, optional dependency as feature, package/feature, weak dependency, ?/ syntax, feature unification, additive, mutually exclusive, resolver v1, resolver v2, resolver v3, --features, --all-features, --no-default-features, required-features, CARGO_FEATURE, feature inspection, cargo tree -e features, SemVer compatibilityreferences/features.md
workspace, [workspace], members, exclude, virtual manifest, default-members, resolver, workspace.package, workspace.dependencies, workspace inheritance, workspace metadata, root package, shared target directory, path dependencies in workspacereferences/workspaces.md
profile, [profile.dev], [profile.release], [profile.test], [profile.bench], opt-level, debug, debug-assertions, overflow-checks, lto, panic, incremental, codegen-units, rpath, strip, split-debuginfo, inherits, custom profile, --profile, --release, package override, build-override, unit graph, target directory layout, monomorphization, genericsreferences/profiles.md
build script, build.rs, build dependency, [build-dependencies], links, *-sys, OUT_DIR, cargo::rustc-link-lib, cargo::rustc-link-search, cargo::rustc-flags, cargo::rustc-cfg, cargo::rustc-check-cfg, cargo::rustc-env, cargo::rerun-if-changed, cargo::rerun-if-env-changed, cargo::warning, cargo::error, cargo::metadata, DEP_, jobserver, code generation, override build script, build script env varsreferences/build-scripts.md
config, configuration, .cargo/config.toml, config hierarchy, precedence, --config, environment variable mapping, CARGO_ prefix, [build], [target], [registry], [source], [net], [http], [term], [env], [alias], [cargo-new], [profile], [credential-alias], [future-incompat-report], [cache], credentials.toml, credential provider, include, rustflags, rustdocflags, rustc-wrapper, target-dir, jobs, proxy, timeoutreferences/config.md
registry, crates.io, index, git protocol, sparse protocol, sparse+, config.json, authentication, token, credential provider, cargo:token, cargo:wincred, cargo:macos-keychain, cargo:libsecret, cargo login, cargo logout, cargo owner, cargo yank, cargo publish, cargo search, cargo info, custom registry, alternate registry, source replacement, replace-with, [patch], [replace], local registry, directory source, vendor, cargo vendor, publish restrictionreferences/registries.md
command, subcommand, flag, cargo build, cargo check, cargo test, cargo bench, cargo run, cargo doc, cargo clean, cargo fix, cargo rustc, cargo rustdoc, cargo add, cargo remove, cargo update, cargo tree, cargo metadata, cargo vendor, cargo fetch, cargo new, cargo init, cargo install, cargo uninstall, cargo search, cargo info, cargo login, cargo logout, cargo owner, cargo yank, cargo publish, cargo package, cargo pkgid, cargo locate-project, cargo generate-lockfile, cargo report, cargo config, cargo version, common flags, --manifest-path, --locked, --frozen, --offline, -Z, pkgid spec, message-format, timingsreferences/commands.md
environment variable, CARGO_HOME, CARGO_BIN_NAME, CARGO_BUILD_, CARGO_CFG_TARGET_, CARGO_CRATE_NAME, CARGO_ENCODED_RUSTFLAGS, CARGO_ENCODED_RUSTDOCFLAGS, CARGO_INCREMENTAL, CARGO_MANIFEST_DIR, CARGO_MANIFEST_LINKS, CARGO_NET_, CARGO_PKG_, CARGO_REGISTRY_, CARGO_TARGET_DIR, CARGO_TARGET_TMPDIR, CARGO_TERM_, CARGO_LOG, CARGO_MAKEFLAGS, RUSTFLAGS, RUSTDOCFLAGS, RUSTC, RUSTDOC, RUSTC_WRAPPER, [env] config, force, relativereferences/environment.md
lockfile, Cargo.lock, lockfile format, package ID, source id, checksum, lockfile version, v3, v4, commit, generate-lockfile, update, precise, dry-run, breaking, cache, registry cache, git cache, ~/.cargo, target directory, target/debug, target/release, fingerprint, incremental, auto-cleanreferences/lockfile.md

Quick Guide

Cross-Project References

  • For the rustc and rustdoc compilers themselves (flag reference, codegen options, lint catalog, target specs), see the official rustc book and rustdoc book — this skill covers only how cargo invokes them.
  • For the Rust language (editions, attributes, cfg expressions, macros, the reference), see the Rust Reference.
  • For carapace-specific cargo completion (the cargo completer, macros like tools.cargo.*), see the carapace skill (in this repo) → references/spec.md within that skill.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

brew

免费

Use this reference to manage software with Homebrew on macOS or Linux, understand formulas and casks, maintain Brewfiles and services, troubleshoot installations, or work on formula and cask development tasks.

中文简介正在准备中。当前显示英语简介。

  • Installing, updating, or removing Homebrew packages
  • Managing services and software lists with a Brewfile
  • Writing or updating a formula or cask
carapace-sh/carapace-bin20002026年10月26日 更新

bubbletea

免费

Use this reference to build and maintain terminal user interfaces in Go with Bubble Tea. It explains the Model/Update/View cycle, commands and messages, input, rendering, program lifecycle, tests, component composition, and patterns for larger applications.

中文简介正在准备中。当前显示英语简介。

  • Building a Bubble Tea terminal interface
  • Handling keyboard, mouse, and window resize events
  • Running asynchronous work through commands and messages
carapace-sh/carapace-bin20002026年10月26日 更新

bun

免费

Use this reference for JavaScript and TypeScript development with Bun. It explains CLI commands, dependency and lockfile management, testing, bundling code, runtime APIs for files and servers, the Bun shell, configuration, and environment variables.

中文简介正在准备中。当前显示英语简介。

  • Installing and managing project dependencies
  • Running tests or building a bundle with Bun
  • Starting a server or reading and writing files
carapace-sh/carapace-bin20002026年10月26日 更新

but

免费

Use this reference to manage Git work with the GitButler CLI (`but`), including virtual and stacked branches, assigning changes, editing commits, resolving conflicts, and creating pull requests. It also covers the workspace, operation history, interactive TUI, configuration, and AI agent setup.

中文简介正在准备中。当前显示英语简介。

  • Working on parallel or stacked branches
  • Assigning file changes to a virtual branch
  • Amending, squashing, or rewording commits
carapace-sh/carapace-bin20002026年10月26日 更新

carapace

免费

Build and maintain carapace shell completions for command-line tools. The reference covers YAML specs, custom completion actions, shell setup, DSL-aware parsing, MCP use, and documentation for suggested values.

中文简介正在准备中。当前显示英语简介。

  • Adding shell completion to a CLI
  • Writing a YAML spec or custom completion action
  • Generating completion documentation for values
carapace-sh/carapace-bin20002026年10月26日 更新

cobra

免费

Use this reference when building command-line applications with `spf13/cobra`. It shows how to organize commands, define flags, validate arguments, add lifecycle hooks, customize help output, provide shell completions, and connect flags with Viper configuration.

中文简介正在准备中。当前显示英语简介。

  • Adding commands and subcommands to a CLI
  • Defining flags and validating positional arguments
  • Customizing help text or command lifecycle hooks
carapace-sh/carapace-bin20002026年10月26日 更新

查看 carapace-sh 的全部技能

报告此技能的问题