Status: planned
Add professional installer and packaging options for distributing recur and recur-git binaries to end users.
- Windows MSI Installer - Professional Windows installation experience
- Linux packages - .deb and .rpm packages for major distros
- Homebrew formula - macOS and Linux package manager support
- Archive releases - ZIP/tar.gz for direct download
- Automated CI releases - Build installers on every release
What we have:
- CI builds both binaries (
recurandrecur-git) - CI uploads raw binaries as artifacts
- No installer packages yet
What we need:
- Package both binaries together in installers
- Add installation scripts
- Include README and license
- Set up PATH automatically
Tool: cargo-wix (Rust-native WiX wrapper)
Setup:
# Add to Cargo.toml
[package.metadata.wix]
upgrade-guid = "GENERATE-UUID-HERE"
path-guid = "GENERATE-UUID-HERE"
license = false
eula = falseCI Integration:
- name: Install cargo-wix
run: cargo install cargo-wix
- name: Build MSI installer
run: cargo wix --nocapture
- name: Upload MSI
uses: actions/upload-artifact@v4
with:
name: recur-windows-installer
path: target/wix/*.msiChallenge: cargo-wix defaults to single binary. Need custom WiX template to package both recur.exe and recur-git.exe.
Custom WiX template location: wix/main.wxs
Windows ZIP:
mkdir recur-windows
cp target/release-safe/recur.exe recur-windows/
cp target/release-safe/recur-git.exe recur-windows/
cp README.md LICENSE recur-windows/
Compress-Archive -Path recur-windows -DestinationPath recur-windows.zipLinux TAR.GZ:
mkdir recur-linux
cp target/release-safe/recur recur-linux/
cp target/release-safe/recur-git recur-linux/
cp README.md LICENSE recur-linux/
tar -czf recur-linux.tar.gz recur-linux/Benefits:
- Simple, no dependencies
- Works immediately
- Good for advanced users
- Easy CI integration
Tool: cargo-deb
cargo install cargo-deb
cargo debConfiguration in Cargo.toml:
[package.metadata.deb]
maintainer = "User Level Up Contributors"
depends = "$auto"
section = "utility"
priority = "optional"
assets = [
["target/release/recur", "usr/bin/", "755"],
["target/release/recur-git", "usr/bin/", "755"],
["README.md", "usr/share/doc/recur/", "644"],
]Install command:
sudo dpkg -i recur_*.debTool: cargo-generate-rpm
cargo install cargo-generate-rpm
cargo build --release
cargo generate-rpmCreate formula: homebrew-recur/Formula/recur.rb
class Recur < Formula
desc "Hierarchical search tool - both recur and recur-git"
homepage "https://github.com/userlevelup/recur"
url "https://github.com/userlevelup/recur/archive/v0.1.11.tar.gz"
sha256 "CALCULATE-AFTER-RELEASE"
license "MIT"
depends_on "rust" => :build
def install
system "cargo", "install", *std_cargo_args(path: ".")
bin.install "target/release/recur"
bin.install "target/release/recur-git"
end
test do
system "#{bin}/recur", "--version"
system "#{bin}/recur-git", "--help"
end
endUsage:
brew tap userlevelup/recur
brew install recurTool: softprops/action-gh-release
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/wix/*.msi
recur-windows.zip
recur-linux.tar.gz
target/debian/*.deb
target/generate-rpm/*.rpm- Add ZIP/TAR.GZ creation to CI
- Upload as artifacts
- Good enough for GitHub releases
- Windows: MSI via cargo-wix
- Linux: .deb via cargo-deb
- More professional installation
- Homebrew formula
- RPM packages
- Consider cargo-binstall metadata
- Tag-triggered releases
- Automatic installer builds
- GitHub releases with all formats
Yes - recur and recur-git are a toolset:
- Users want the full capability
- recur-git depends on recur library
- Simpler than separate packages
"recur" - The main package includes both binaries:
- Install:
recur(gets bothrecurandrecur-gitcommands) - No separate
recur-gitpackage needed
Same version - Both binaries share Cargo.toml version:
- Single source of truth
- No version mismatch issues
- Simpler release process
build-installers:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build binaries
run: cargo build --release --locked
# Option 1: Simple ZIP
- name: Create Windows ZIP
run: |
mkdir recur-windows
cp target/release/recur.exe recur-windows/
cp target/release/recur-git.exe recur-windows/
cp README.md LICENSE recur-windows/
Compress-Archive -Path recur-windows -DestinationPath recur-windows.zip
# Option 2: MSI (requires cargo-wix setup)
- name: Install cargo-wix
run: cargo install cargo-wix
- name: Build MSI
run: cargo wix --nocapture
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: recur-installers
path: |
recur-windows.zip
target/wix/*.msiTools:
- cargo-wix: https://github.com/volks73/cargo-wix
- cargo-deb: https://github.com/kornelski/cargo-deb
- cargo-generate-rpm: https://github.com/cat-in-136/cargo-generate-rpm
- softprops/action-gh-release: https://github.com/softprops/action-gh-release
Documentation:
- WiX Toolset: https://wixtoolset.org/
- Debian packaging: https://www.debian.org/doc/manuals/maint-guide/
- Homebrew formula cookbook: https://docs.brew.sh/Formula-Cookbook
- Document installer options (this file!)
- Phase 1: ZIP/TAR.GZ archives in CI
- Phase 2: MSI installer for Windows
- Phase 3: .deb package for Debian/Ubuntu
- Phase 4: Homebrew formula
- GitHub releases with all formats
- CI configuration:
.github/workflows/ci.yml - Binary definitions:
Cargo.toml(lines 20-26) - recur-git artifact:
docs/main.recur-git.artifact.md