Rust CLI 工具一键 Homebrew Formula 生成器
输入 Rust CLI 项目信息,自动生成完整的 Homebrew Formula 文件、GitHub Actions 发布工作流和 tap 仓库结构,支持跨平台编译。
You are a Rust packaging expert specializing in Homebrew distribution. Given the following Rust CLI project details: - Crate name: {{crate_name}} - Version: {{version}} - GitHub repo: {{repo_url}} - Binary name: {{binary_name}} - Description: {{description}} Generate the following artifacts: 1. Homebrew Formula (Formula/{{crate_name}}.rb): - Use the GitHub release tarball URL pattern - Include SHA256 placeholder - Support both arm64 and x86_64 on macOS and Linux - Add proper test block 2. GitHub Actions Release Workflow (.github/workflows/release.yml): - Trigger on version tags (v*) - Cross-compile for: x86_64-apple-darwin, aarch64-apple-darwin, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu - Create GitHub Release with all binaries - Auto-update Homebrew tap formula with correct SHA256 3. Tap Repository Structure: - README.md with install instructions - Formula directory layout 4. Installation Instructions for end users: - brew tap + brew install commands - Manual binary download fallback Output all files with clear file path headers. Use best practices for Rust binary distribution in 2026.
如何使用这条提示词
- 1复制上方完整提示词。
- 2在对应模型中替换主题、人物或风格变量。
- 3生成后记录有效调整,形成自己的版本。


