macOS
brew install cargo-generatelocal Homebrew formula metadata
sudo port install cargo-generateMacPorts ports tree · devel/cargo-generate/Portfile · 来源: api.github.com
安装
brew install cargo-generatelocal Homebrew formula metadata
sudo port install cargo-generateMacPorts ports tree · devel/cargo-generate/Portfile · 来源: api.github.com
sudo apk add cargo-generateAlpine Linux edge package indexes · cargo-generate · 来源: dl-cdn.alpinelinux.org
nix profile install nixpkgs#cargo-generatenixpkgs package indexes · pkgs/by-name/ca/cargo-generate/package.nix · 来源: api.github.com
sudo pacman -S cargo-generateArch Linux sync databases · cargo-generate · 来源: geo.mirror.pkgbuild.com
概览
Use pre-existing git repositories as templates
历史
cargo-generate is a Cargo subcommand for creating new Rust projects from existing git repositories used as templates. Its tagline, repeated in the README and guide, is `cargo, make me a project`.
The tool filled a gap left by Cargo's built-in `cargo new`: it lets communities publish richer starter projects, prompts, placeholders, hooks, and favorites without adding template logic to Cargo itself.
The cargo-generate repository and first crates.io release appeared in May 2018. The official guide describes the core idea as leveraging a pre-existing git repository as a template to get a Rust project started quickly.
The project grew into a small templating engine around Git repositories. The guide documents Shopify Liquid for templated content, Rhai for hook scripts, regex placeholders, and special handling for `.liquid` files.
Its documentation also treats template discovery and reuse as first-class concepts: the README points users to the GitHub `cargo-generate` topic, while the guide supports favorite templates stored in `$CARGO_HOME/cargo-generate.toml` or `$CARGO_HOME/cargo-generate`.
cargo-generate became common in Rust sub-ecosystems where a useful starter project needs more than a bare crate. The official README uses rustwasm's wasm-pack-template as its example, reflecting early adoption by WebAssembly-oriented Rust workflows.
By 2026 it had more than 2 million crates.io downloads and an active changelog, indicating sustained use as a project-scaffolding utility rather than a one-off template experiment.
Typical usage is `cargo generate --git https://github.com/owner/template.git` or the shorthand `cargo generate owner/template`. The README also documents prefixes for GitHub, GitLab, Bitbucket, and SourceHut template locations.
Template authors can use Liquid files, Rhai hooks, and placeholders; users can define favorite templates in the cargo-generate config file and then invoke them by name.
cargo-generate is package-nerd significant because it made template repositories a distribution format in the Rust ecosystem. A Git repo could become a reusable package-like project skeleton without needing to be published as a crate.
It also demonstrates the Cargo subcommand pattern at its most social: package managers do not just install programs, they standardize how communities bootstrap new projects.
安全态势
没有找到 cargo-generate 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
$CARGO_HOME/cargo-generate.toml$CARGO_HOME/cargo-generate可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
cargo-generate | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/cargo-generate/cargo-generate
安装元数据
| 软件包键 | brew:cargo-generate |
|---|---|
| 版本 | 0.23.14 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/cargo-generate |
| 主页 | https://github.com/cargo-generate/cargo-generate |
| 仓库 | https://github.com/cargo-generate/cargo-generate |
| 上游文档 | https://cargo-generate.github.io/cargo-generate/index.html |
| 许可证 | Apache-2.0 OR MIT |
| 源码归档 | https://github.com/cargo-generate/cargo-generate/archive/refs/tags/v0.23.14.tar.gz |
| 最后更新 | 2026-07-23T16:35:37Z |
| Pulse | updated |
| 依赖 | libgit2, libssh2, openssl@3 |
| 构建依赖 | pkgconf, rust |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | cargo-generate |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
cargo-generate
nix profile install nixpkgs#cargo-generatecargo-generate 0.23.8-r0
Use pre-existing git repositories as templates
https://github.com/cargo-generate/cargo-generate
sudo apk add cargo-generatecargo-generate 0.23.11-1
Use pre-existing git repositories as templates
https://github.com/cargo-generate/cargo-generate
sudo pacman -S cargo-generatecargo-generate
sudo port install cargo-generate来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.