| Crates.io | cargo-emerge |
| lib.rs | cargo-emerge |
| version | 0.1.0 |
| created_at | 2025-10-01 21:30:33.695993+00 |
| updated_at | 2025-10-01 21:30:33.695993+00 |
| description | Emerge Application Setup Generation Tool |
| homepage | |
| repository | https://github.com/aspectron/emerge |
| max_upload_size | |
| id | 1863529 |
| size | 81,577 |
A setup generation tool for desktop Rust applications that creates professional, platform-specific setup packages including DMG images for macOS, zip archives for Windows, and tar.gz archives for Linux.
$VARIABLE syntaxcargo install --path .
Navigate to your project directory and run:
cargo emerge
This will:
Cargo.tomlcargo emerge [OPTIONS]
Options:
-p, --path <PATH> Path to Cargo.toml or directory containing it
-m, --manifest <FILE> Path to alternative manifest file for emerge configuration
-v, --verbose Enable verbose output
-a, --archive Create an archived setup (.tar.gz or .zip)
--dmg Create DMG image (default on macOS)
--no-build Skip build commands (use existing binaries)
-h, --help Print help
-V, --version Print version
# Create DMG on macOS with verbose output
emerge --verbose
# Create archive instead of DMG
emerge --archive
# Use a specific Cargo.toml
emerge --path /path/to/project
# Use an alternative manifest file for emerge configuration
emerge --manifest my-setup-config.toml
# Skip build and use existing binaries
emerge --no-build
You can use the --manifest flag to specify an alternative TOML file containing emerge configuration. This is useful for:
The manifest file can be in two formats:
Format 1: Standalone emerge configuration
title = "My App"
filename = "myapp-$PLATFORM-$VERSION"
output-folder = "dist"
build = ["cargo build --release"]
copy = []
icon = "icon.png"
Format 2: Full Cargo.toml format
[package.metadata.emerge]
title = "My App"
filename = "myapp-$PLATFORM-$VERSION"
output-folder = "dist"
build = ["cargo build --release"]
copy = []
icon = "icon.png"
When using --manifest, emerge will:
Add a [package.metadata.emerge] section to your Cargo.toml:
[package.metadata.emerge]
title = "My Application"
filename = "my-application-$PLATFORM-$VERSION"
output-folder = "setup"
# Build commands to execute before packaging
build = [
"cargo build --release"
]
# Files to copy (source = destination)
copy = [
{ "resources" = "resources" },
{ "README.md" = "README.md" }
]
# Optional: Path to application icon
# Supports .icns, .png, .jpg, and other formats
# Will automatically convert to .icns with proper retina sizes
icon = "assets/icon.png"
# DMG-specific configuration (macOS only)
[package.metadata.emerge.dmg]
background = "assets/dmg-background.png"
window_position = [100, 100]
window_size = [600, 400]
app_position = [150, 200]
applications_position = [450, 200]
The following variables are available for use in the configuration:
$NAME - Package name from Cargo.toml$VERSION - Package version from Cargo.toml$PLATFORM - Current platform (macos, linux, or windows)Example:
filename = "$NAME-$PLATFORM-$VERSION"
# Results in: myapp-macos-1.0.0.dmg
For macOS DMG images, you can customize:
The tool is organized into the following modules:
hdiutil (included with macOS)osascript (included with macOS)See LICENSE file for details.
Inspired by cargo-nw