| Crates.io | kodegen_bundler_release |
| lib.rs | kodegen_bundler_release |
| version | 0.10.9 |
| created_at | 2025-11-03 17:26:28.358955+00 |
| updated_at | 2026-01-02 15:19:16.728648+00 |
| description | KODEGEN.α΄Ιͺ: Memory-efficient, Blazing-Fast, MCP tools for code generation agents. |
| homepage | https://kodegen.ai |
| repository | https://github.com/cyrup-ai/kodegen-bundler-release |
| max_upload_size | |
| id | 1915021 |
| size | 341,130 |
Production-quality release management and multi-platform bundling for Rust workspaces.
git CLI dependency, uses gix# Install from crates.io
cargo install kodegen_bundler_release
# OR build from source
git clone https://github.com/cyrup-ai/kodegen-bundler-release
cd kodegen-bundler-release
cargo install --path .
# Release with patch version bump (0.1.0 β 0.1.1)
kodegen_bundler_release release patch
# Preview changes without making modifications
kodegen_bundler_release release minor --dry-run
# Create platform-specific bundles
kodegen_bundler_release bundle --platform deb
# Resume an interrupted release
kodegen_bundler_release resume
# Rollback a failed release
kodegen_bundler_release rollback
When you run a release command, the tool:
/tmp/kodegen-release-{timestamp}/ (isolated environment)Cargo.toml filesv0.1.0)Your working directory is never modified. All operations happen in an isolated temporary clone.
# Standard release workflow
kodegen_bundler_release release patch
# Bump minor version (0.1.x β 0.2.0)
kodegen_bundler_release release minor
# Bump major version (0.x.y β 1.0.0)
kodegen_bundler_release release major
# Dry run (preview without changes)
kodegen_bundler_release release patch --dry-run
# Release without pushing to remote
kodegen_bundler_release release patch --no-push
# Release without GitHub release
kodegen_bundler_release release patch --no-github-release
# Release without creating bundles
kodegen_bundler_release release patch --no-bundles
# Keep temp clone for debugging
kodegen_bundler_release release patch --keep-temp
# Bundle for current platform
kodegen_bundler_release bundle
# Bundle specific platform
kodegen_bundler_release bundle --platform deb
kodegen_bundler_release bundle --platform dmg
# Bundle without rebuilding binaries
kodegen_bundler_release bundle --no-build
# Bundle and upload to GitHub release
kodegen_bundler_release bundle --upload --github-repo owner/repo
# Bundle for specific architecture
kodegen_bundler_release bundle --target x86_64-apple-darwin
# Resume interrupted release
kodegen_bundler_release resume
# Check current release status
kodegen_bundler_release status
# Rollback failed release
kodegen_bundler_release rollback
# Force rollback (even for completed releases)
kodegen_bundler_release rollback --force
# Clean up state without rollback
kodegen_bundler_release cleanup
# Validate workspace structure
kodegen_bundler_release validate
# Verbose validation output
kodegen_bundler_release validate --verbose
# crates.io API token
export CARGO_REGISTRY_TOKEN=cio_xxxx
# GitHub API token (for GitHub releases)
export GITHUB_TOKEN=ghp_xxxx
# OR
export GH_TOKEN=ghp_xxxx
# Add to ~/.zshrc (loaded automatically on startup)
export APPLE_CERTIFICATE=<base64-encoded-p12>
export APPLE_CERTIFICATE_PASSWORD=<password>
export APPLE_TEAM_ID=<team-id>
# Optional: App Store Connect API (for notarization)
export APPLE_API_KEY_CONTENT=<base64-key>
export APPLE_API_KEY_ID=<key-id>
export APPLE_API_ISSUER_ID=<issuer-id>
Configure bundling behavior in your workspace Cargo.toml:
[package.metadata.bundle]
identifier = "com.example.myapp"
publisher = "Example Inc."
icon = ["assets/icon.png"]
category = "Developer Tool"
short_description = "My awesome application"
[package.metadata.bundle.linux.deb]
depends = ["libc6"]
[package.metadata.bundle.linux.rpm]
requires = ["glibc"]
rustup install nightly && rustup default nightly# Build release binary
cargo build --release
# Run tests
cargo test
# Format code
cargo fmt
# Lint
cargo clippy -- -D warnings
For creating Linux/Windows bundles from macOS (or vice versa), use Docker:
# Build Docker image (includes Wine, NSIS)
kodegen_bundler_release bundle --rebuild-image
# Create Windows NSIS installer from Linux/macOS
kodegen_bundler_release bundle --platform exe
# Create Linux packages from macOS
kodegen_bundler_release bundle --platform deb
The tool automatically detects when cross-platform bundling is needed and uses Docker containers with appropriate toolchains.
All release operations execute in temporary clones to ensure your working directory remains untouched:
/tmp/kodegen-release-{timestamp}/~/.kodegen-temp-release for resume support--keep-temp)The tool analyzes your workspace dependency graph and publishes packages in the correct order:
Tier 0: [utils, schema] β No dependencies
Tier 1: [mcp-tool, mcp-client] β Depends on Tier 0
Tier 2: [tools-git, tools-fs] β Depends on Tier 1
Tier 3: [kodegen] β Depends on Tier 2
Packages within the same tier publish in parallel (configurable concurrency), while tiers execute sequentially.
Release progress is tracked in .cyrup_release_state.json with phases:
If a release is interrupted, resume continues from the last successful checkpoint.
Version updates preserve your Cargo.toml formatting using toml_edit:
The release workflow integrates with kodegen-bundler-bundle via a strict contract that guarantees artifact location and existence.
The release workflow detects the target architecture at compile time using Rust's cfg attributes:
#[cfg(target_os = "macos")]
#[cfg(target_arch = "aarch64")]
return Ok("arm64"); // macOS ARM64
#[cfg(target_os = "linux")]
#[cfg(target_arch = "x86_64")]
return Ok("amd64"); // Linux x86_64
This ensures the correct architecture is always used for artifact naming, even during cross-compilation.
The release workflow constructs the complete output path including architecture:
// Detect actual target architecture
let arch = detect_target_architecture()?; // "arm64", "amd64", etc.
// Construct filename with explicit architecture
let filename = format!("kodegen_{}_{}.deb", version, arch);
let output_path = temp_dir.join("artifacts").join(&filename);
Example filenames:
kodegen_2.0.0_arm64.deb (Debian ARM64)kodegen_2.0.0_amd64.deb (Debian x86_64)kodegen-2.0.0-arm64.dmg (macOS ARM64)kodegen_2.0.0_x64_setup.exe (Windows x64)The release workflow passes the full path to the bundler and enforces the contract:
let output = Command::new("kodegen_bundler_bundle")
.arg("--repo-path").arg(temp_dir)
.arg("--platform").arg("deb")
.arg("--binary-name").arg("kodegen")
.arg("--version").arg("2.0.0")
.arg("--output-binary").arg(&output_path) // β Contract: bundler puts artifact HERE
.arg("--no-build")
.output()?;
// Check exit code
if !output.status.success() {
return Err("Bundler failed");
}
// Contract verification: exit code 0 means file MUST exist
if !output_path.exists() {
return Err("Bundler contract violation: exit 0 but artifact not found");
}
// File is guaranteed to exist at output_path
When called with --output-binary, the bundler guarantees:
This contract-based design provides:
Solution: Build binaries before bundling:
cargo build --release --workspace
# OR let bundler build automatically
kodegen_bundler_release bundle # No --no-build flag
Solution: Resume or clean up the existing release:
kodegen_bundler_release resume
# OR
kodegen_bundler_release cleanup
Solution: Set the required environment variable:
export GITHUB_TOKEN=ghp_your_token_here
# OR add to ~/.bashrc or ~/.zshrc
Solution: Verify credentials are loaded:
echo $APPLE_TEAM_ID
echo $APPLE_CERTIFICATE | base64 -d | openssl pkcs12 -info -nodes -passin pass:$APPLE_CERTIFICATE_PASSWORD
Solution: Increase Docker memory limit:
kodegen_bundler_release bundle --platform exe --docker-memory 4096
kodegen-bundler-release/
βββ src/
β βββ bundler/ # Platform-specific bundling logic
β βββ cli/ # Command parsing and orchestration
β βββ error/ # Error types and handling
β βββ git/ # Git operations (via gix)
β βββ github/ # GitHub API integration
β βββ publish/ # crates.io publishing logic
β βββ state/ # Release state persistence
β βββ version/ # Version bumping and TOML editing
β βββ workspace/ # Workspace analysis and graphs
βββ Cargo.toml
βββ README.md
# All tests
cargo test
# Specific module
cargo test --lib workspace::tests
# With output
cargo test -- --nocapture
RUST_LOG=debug kodegen_bundler_release release patch --dry-run
Contributions are welcome! Please:
git checkout -b feature/my-featurecargo fmtcargo clippy -- -D warnings#![deny(unsafe_code)] except for audited FFI callsDual-licensed under Apache-2.0 OR MIT.
See LICENSE.md for details.
Part of the KODEGEN.α΄Ιͺ project - blazing-fast MCP tools for AI-powered code generation.