Back to list
开发工具RustHomebrewCI/CD发布自动化CLI工具
Rust CLI 工具一键 Homebrew Formula 生成器
输入 Rust CLI 项目信息,自动生成完整的 Homebrew Formula 文件、GitHub Actions 发布工作流和 tap 仓库结构,支持跨平台编译。
6 views4/27/2026
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:
-
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
-
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
-
Tap Repository Structure:
- README.md with install instructions
- Formula directory layout
-
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.