本文へ移動
cccskills
無料GitHub で公開日本語紹介

cargo

Rustプロジェクトのビルドやテストから、依存関係、ワークスペース、公開設定まで、`cargo`の使い方と設定を調べられるスキルです。

原文原文の説明を見る

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)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • Rustプロジェクトの依存関係を設定したいとき
  • featureやworkspaceの仕組みを確認したいとき
  • ビルドやテストのコマンドを調べたいとき
  • crateの公開や再現ビルドを準備するとき

日本語での紹介

できること

Rustのパッケージマネージャーcargoについて、プロジェクトの設定から日々のコマンドまで調べられます。Cargo.tomlの書き方、依存パッケージやfeature、複数のcrateをまとめるworkspace、ビルドプロファイル、build.rsによるビルドスクリプト、.cargo/config.tomlの設定を扱います。レジストリの利用や公開、環境変数、Cargo.lockとキャッシュの仕組み、コマンドの引数も参照できます。ビルド、テスト、実行、依存関係の確認など、目的に合う項目を選んで使えます。

こんなときに便利

Rustプロジェクトを新しく作るときや、既存プロジェクトの設定を読み解くときに役立ちます。依存関係の追加やfeatureの有効化、workspaceの構成、ビルド条件の調整を確認したい場合にも使えます。公開や再現性のあるビルド、依存関係の一覧確認など、cargoの操作を調べたい人にも向いています。

使い方の例

  • Cargo.tomlで依存パッケージを指定する方法を教えて
  • workspaceで共通の依存関係を設定する方法を調べて
  • cargo treeで依存関係を確認する手順を説明して

注意点

Rust言語仕様やrustc、rustdoc自体の詳細なオプションは対象外です。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(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(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

無料概要あり

macOSやLinuxのHomebrewについて、brewコマンドでの導入・更新から、FormulaやCask、Brewfile、サービス管理、開発者向け操作まで調べられるスキルです。

  • Homebrewでソフトを導入・更新したいとき
  • Brewfileで環境を管理したいとき
  • FormulaやCaskを作成・更新したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

bubbletea

無料概要あり

Go製TUIフレームワークBubble Teaの画面構成、入力・非同期処理、テスト、部品の組み合わせ方を調べ、端末アプリの実装や設計に活用できます。

  • Bubble Teaで端末画面を作りたいとき
  • キーやマウス入力を処理したいとき
  • 非同期処理を画面に組み込みたいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

bun

無料概要あり

BunのCLI、パッケージ管理、テスト、バンドル、実行時APIやシェルの使い方を調べ、JavaScript・TypeScriptの開発作業に活用できます。

  • Bunで依存パッケージを管理したいとき
  • テストやコードのバンドルを実行したいとき
  • Bunでサーバーやファイル処理を実装したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

but

無料概要あり

GitButler CLIで仮想ブランチや積み重ねたブランチを管理し、変更の割り当て、コミット編集、競合解決、PR作成までのGit作業を進められます。

  • 作業を仮想ブランチに分けたいとき
  • コミットを修正・統合したいとき
  • 操作履歴を見て変更を取り消したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

carapace

無料概要あり

carapaceをCLIに組み込み、シェル補完のYAML仕様や独自アクションを作成し、シェル設定やMCP連携、補完値の説明まで扱うスキルです。

  • CLIにシェル補完を追加したいとき
  • YAMLの補完仕様を作成したいとき
  • 独自の補完アクションを実装したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

cobra

無料概要あり

Goの`spf13/cobra`でCLIアプリを作る際に、コマンドやフラグ、引数検証、ヘルプ表示、シェル補完を設計する方法を調べられます。Viperとの設定連携も扱います。

  • CLIにコマンドやサブコマンドを追加したいとき
  • フラグや位置引数を検証したいとき
  • ヘルプ表示や実行フックを調整したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

carapace-sh のスキルをすべて見る

このスキルの問題を報告する