Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Packaging & Distribution

This guide outlines how to package, distribute, and verify Kroki-rs artifacts.

1. Release Flow

Kroki-rs follows a binary release flow coordinated by dflow:

  1. Proposal: Run ./dflow release -b. This uses src-scripts/gh-tasks/propose-release.sh to bump the version in Cargo.toml, update CHANGELOG.md, and create a release/vX.X.X PR branch.

  2. Verification: GitHub Actions runs the full CI-Build verification on the release PR.

  3. Approval: Once checks pass, the maintainer merges the PR.

  4. Tagging: Run ./dflow release --tag. This uses src-scripts/gh-tasks/tag-release.sh to create an official Git tag and push it, triggering the distribution workflows (release.yml and publish-packages.yml).

Distribution Channels

ChannelFormatRecommended For
HomebrewFormula (RB)macOS & Linux Desktop users.
GitHub ReleasesBinaries (Tar.gz)Manual installation, air-gapped envs.
Docker (GHCR)OCI ImageServer deployments, CI/CD, Kubernetes.
Cargo (crates.io)SourceRust developers and system integrators.

1. Automated Packaging

Use the Makefile to generate standardized release artifacts:

# Build and package the binary with checksums
make dist

This creates a dist/ directory containing:

2. GitHub Container Registry (Docker)

Images are published to ghcr.io for every release tag via the publish-packages.yml workflow. This workflow builds the final production image and verifies its integrity before pushing.

Production Image Structure

The production image (ghcr.io/softmentor/kroki-rs) is designed for stability and minimal size:

Automated Smoke Testing

Before any image is published to GHCR, it must pass a rigorous smoke test suite that:

  1. Health Check: Ensures the server starts and responds on port 8081.

  2. Version Verification: Confirms the reported version matches the release tag.

  3. Rendering Validation: Performs live diagram generation tests (Graphviz, D2) inside the fresh container to ensure all native drivers are correctly linked.

3. Security & Integrity

Binary Integrity

Always publish and verify SHA-256 checksums. For manual verification:

shasum -a 256 kroki-rs-<platform>.tar.gz

Signing

Reproducible Builds

All public artifacts are built via GitHub Actions Automation using the same fingerprinted CI environment used during development, ensuring the published binary exactly matches the source.