Introducing a new way to review your PRs.

Read the announcement

crmne / zapfast

ZapFast: a fast, native WhatsApp client in Rust and egui

View on GitHub

19 documents · Updated Nov 18, 2026

docs / platform-packaging-and-installation

Platform packaging and installation

ZapFast turns one desktop application build into platform-specific packages that users can install on Linux, macOS, and Windows. The release system also supports package-manager recipes and portable downloads, then checks that each package starts, exposes the needed desktop integration, and can be removed without damaging user data. See Updates and release delivery for the release flow that publishes these artifacts.

Distribution model

The packaging system separates the application build from the platform wrapper. native-packages.yaml defines the supported targets, package formats, runtime libraries, package contents, and downstream recipe sources; the files in packaging/ supply platform-specific assets and native build steps.

The main distribution paths are:

PathUser formMain platform role
Linux native packagesDEB and RPMInstall through a distribution package manager with desktop files, icons, runtime dependencies, and clean removal.
Linux portable buildsAppImage and archiveRun without a package manager while still carrying desktop integration assets for manual installation.
Linux package managersArch, Homebrew, Flatpak, Fedora COPR, and openSUSE OBS recipesBuild or install through a community or platform package system.
macOSUniversal DMG and Homebrew CaskInstall one app bundle that runs on both supported Mac architectures.
WindowsPer-user MSI and portable ZIPInstall without administrator rights or run the extracted executable directly.

References: native-packages.yaml• L1-25 native-packages.yaml• L103-157 native-packages.yaml• L177-229 README.md• L61-69

Linux distribution

Linux packages provide a native desktop install for both x86-64 and ARM64. The package manager receives the executable, desktop launcher, icon, and Omarchy integration files, while the package metadata names the graphics, window, sound, and PipeWire libraries that the application loads at run time.

Linux release binaries are built against glibc 2.36 in Debian 12. The supported package range starts at distributions with a new enough glibc and PipeWire stack; Ubuntu 22.04 is outside that range because its PipeWire library is too old. DEB packages serve Debian and Ubuntu families, while RPM packages serve Fedora and openSUSE systems. AppImage provides a portable alternative.

The RPM package also presents the former fastsapp package identity as an upgrade path. This lets Fedora and openSUSE package systems move users to ZapFast without treating the renamed application as an unrelated package.

The Linux package lifecycle preserves user state. Installation adds the program and desktop integration. Removal deletes those installed files but leaves the existing ZapFast settings and archive in place.

References: native-packages.yaml• L7-15 native-packages.yaml• L25-92 packaging/test-install.sh• L1-64 packaging/…/PKGBUILD.in• L9-19 packaging/…/zapfast.spec• L20-50 PACKAGING.md• L95-110

Linux portable installation

Portable Linux distribution is intended for users who do not want a system package. The release archive contains the executable and the files needed for manual desktop integration; the AppImage can run directly after it is made executable.

The AppImage does not bundle the host's desktop sound libraries. A desktop therefore supplies ALSA and PipeWire at run time, and the release check runs the image in extraction mode because CI runners do not provide FUSE. The same validation confirms that the image reports a valid application version.

References: release.yml• L125-145 packaging/zapfast-portable.txt• L1-200 packaging/…/zapfast.desktop• L1-18 .github/…/packaging.yml• L114-146

Linux package-manager paths

Linux package-manager distribution uses the same application release but adapts it to each manager's trust and build model. Arch recipes cover source, binary, and development variants; Homebrew publishes a cask; Flatpak provides a sandbox; Fedora COPR and openSUSE OBS build from release source.

Flatpak has two related goals. The source manifest lets Flathub build from a selected source revision with locked, offline Cargo inputs. The bundle manifest packages the Linux release binary into the same sandbox for the GitHub release. Both forms keep the same app identity and permissions for display, sound, network access, key storage, notifications, tray behavior, and durable application state.

Flatpak AppStream metadata presents the app to software catalogs. It keeps the desktop application identity, launch target, user-facing description, supported controls, and release links aligned with the package that users can install. Each current release entry points to its published release page, including version 0.21.3.

These package-manager paths are not all automatic user-install routes. Recipe generation and external repository submission remain separate delivery steps, so a package can be prepared and validated without being published to the downstream repository.

References: native-packages.yaml• L177-227 packaging/…/rocks.zapfast.ZapFast.yml• L1-68 packaging/…/rocks.zapfast.ZapFast.bundle.yml• L1-38 packaging/…/rocks.zapfast.ZapFast.metainfo.xml• L2-92 packaging/…/flathub.sh• L1-46 packaging/…/test-packaging.py• L19-53 PACKAGING.md• L165-209

macOS application installation

macOS distribution uses a universal app bundle inside a DMG. The release job builds native ARM64 and x86-64 binaries, combines them into one executable, adds the app metadata, icon, login item, sounds, and permission declarations, then creates the disk image with an Applications link.

The bundle keeps the established application identifier even though the product has a new name. This preserves the link to existing paired-device and keychain state. It also tells macOS to follow the GPU that drives the screen, which keeps windows usable when a dual-GPU Intel Mac switches graphics hardware.

The final DMG is the user-facing trust boundary. When Apple credentials are configured, the app and DMG are signed and notarized before publication. Verification mounts the delivered image and checks the notarization ticket, code signature, Gatekeeper assessment, both CPU architectures, and the camera and microphone permission metadata needed by the app.

Homebrew Cask points to the same universal DMG. It is a package-manager entry for the signed application rather than a second macOS build.

References: release.yml• L187-258 packaging/…/Info.plist• L5-22 packaging/…/bundle.sh• L1-58 packaging/…/dmg.rb• L1-30 packaging/…/verify.sh• L1-41 packaging/…/zapfast.rb.in• L1-16 tests/packaging_macos.rs• L17-47 PACKAGING.md• L61-93

Windows installation

Windows distribution has two user-facing forms: a portable ZIP and a per-user MSI for x86-64 and ARM64. The MSI installs under the current user's local application directory, creates a Start menu entry, and keeps a desktop shortcut when the previous installation had one. It does not require administrator rights.

The MSI is also the upgrade bridge from the older Inno Setup installer. It detects an earlier MSI or Inno installation, reuses that program folder, removes the old uninstaller and legacy registration, and keeps user session and archive data because that data lives outside the program folder. A fixed Windows Installer upgrade identity lets later MSI versions update the same installed product.

The installer refuses to install or uninstall while ZapFast is running. This protects the program folder from being left partly replaced or partly removed. The updater marks installer-managed copies so future updates select the MSI path.

Windows releases sign the executable before it is put into the portable ZIP or MSI, then sign the MSI before checksums and attestations. The release identity is the same across versions so downloaded packages build publisher reputation over time.

References: native-packages.yaml• L95-133 release.yml• L101-169 packaging/…/zapfast.wxs• L1-18 packaging/…/zapfast.wxs• L22-35 packaging/…/zapfast.wxs• L72-162 packaging/…/msi.rb• L1-32 PACKAGING.md• L112-163

User installation paths

Users can choose a platform package, a portable artifact, or a package-manager entry based on the operating system and the desired level of system integration. The public installation choices include Homebrew Cask on macOS, Arch's binary package, Windows downloads, and Linux downloads such as AppImage and Nix; source installation remains a separate developer path.

Each release note gives users direct links for the supported Mac, Windows, Linux archive, AppImage, Flatpak, DEB, and RPM artifacts. The 0.21.3 release also points users to the Homebrew, Arch, and Fedora COPR installation paths, so package downloads and package-manager routes remain visible from the same release entry.

Linux users can also install a built executable for one user with packaging/install-user.sh. The script installs the binary under a prefix, adds the icon, and writes a desktop launcher whose executable path is absolute. This keeps the launcher working when a graphical session does not include the user's bin directory on PATH, including prefixes with spaces, percent signs, or backslashes.

References: README.md• L61-69 packaging/…/v0.21.3.md• L1-5 packaging/install-user.sh• L1-17 packaging/install-user.sh• L23-46 packaging/install-user.sh• L48-98 packaging/test-install-user.sh• L1-89

Runtime validation

Runtime validation checks the installed product in an environment that does not hide missing dependencies behind the build host. Linux checks install the DEB or RPM in clean Ubuntu, Debian, Fedora, and openSUSE containers, run the application, load the GUI libraries directly, verify desktop assets, remove the package, and confirm that a pre-existing settings file remains.

The checks cover more than process startup. They validate the package-manager identity, the launcher and icon, Omarchy assets, runtime-loaded sound and graphics libraries, and the boundary between application files and user data. AppImage validation separately confirms that the portable image can report its version with the runner's available sound libraries.

References: packaging/test-install.sh• L1-64 packaging/check-runtime-libs.c• L1-28 .github/…/packaging.yml• L90-146

Installer tests

Installer tests model the user lifecycle rather than only testing that a package can be built. The Windows test creates a legacy Inno installation, upgrades it with the MSI, performs a later MSI update, checks the running-process refusal, uninstalls after exit, repeats takeover in a custom folder, and builds the ARM64 MSI.

The user-install test uses temporary prefixes that contain path characters which often break desktop launchers. It checks that the generated launcher quotes and escapes the executable path, keeps URI and quit arguments, honors an explicit prefix, and turns a relative prefix into an absolute one without writing to the developer's real data directory.

Flatpak packaging tests keep the source and release bundle manifests aligned. They also confirm that generated source metadata uses the requested revision and its lockfile instead of an unrelated or mutable dependency set.

The macOS packaging tests keep the bundle's legacy identity, login agent, and automatic graphics switching setting aligned with the runtime expectations. This protects existing paired-device state and prevents a graphics switch from producing a blank window.

References: packaging/…/test-installer.ps1• L1-147 packaging/test-install-user.sh• L1-89 packaging/…/test-packaging.py• L1-57 tests/packaging_macos.rs• L1-47 .github/…/packaging.yml• L51-88 .github/…/packaging.yml• L148-155

Installation flow

The release flow transforms a platform build into an installable artifact and then validates the artifact in the environment where users will consume it.

flowchart LR
    A[Platform build] --> B[Portable archive or app bundle]
    B --> C[Native package wrapper]
    C --> D[Sign and attest]
    D --> E[Clean install checks]
    E --> F[Release and package-manager delivery]
    F --> G[User install or portable run]

The wrapper preserves the same application identity while adding platform rules. Linux adds package dependencies and desktop files. macOS adds a universal app and Apple trust data. Windows adds per-user install, upgrade, and uninstall behavior.

References: release.yml• L32-185 release.yml• L187-298 .github/…/packaging.yml• L40-155 native-packages.yaml• L103-176

Change checklist

When these files or sections are changed, remember to consider these:

  • A Linux binary or GUI dependency change must update both native package dependency declarations and the clean-container runtime checks for Debian, Fedora, and openSUSE package systems.
  • A package rename or compatibility alias must preserve the upgrade path from the former package identity and keep package-manager install checks aligned.
  • A desktop launcher or icon change must stay aligned across package installs, portable archives, AppImage contents, Flatpak identity rewriting, and per-user installation.
  • A Windows installer identity or install path change must preserve MSI upgrade behavior, winget's UpgradeCode, and takeover of the legacy Inno installation.
  • A macOS bundle identifier, launch agent, graphics, permission, or signing change must update the bundle metadata and the macOS packaging tests plus final mounted-DMG verification.
  • A Flatpak sandbox change must keep the source and release bundle manifests equal and preserve the app ID used by desktop, AppStream metainfo, and catalog links.
  • A new or changed Flatpak release entry must point to the published release and keep the app version visible in the catalog metadata.
  • A new release format must be connected to both artifact publication and a user-facing installation or runtime check; recipe generation alone does not publish it.

Important failure modes

TriggerConsequenceGuard
A Linux package omits a library loaded by the GUIInstallation succeeds but the app can fail at startup on a clean systemClean Ubuntu, Debian, Fedora, and openSUSE installs run check-runtime-libs after package installation.
A package removes files outside its program payloadUser settings or the encrypted archive can be lost during removalThe Linux install test seeds a settings file and checks it after removal.
A package rename drops the former package identityPackage managers can install a second product instead of upgrading the existing oneThe RPM package provides and obsoletes fastsapp, while clean install checks verify the resulting zapfast package.
A Windows MSI runs while ZapFast is activeThe program directory may be partly replaced or removedWiX blocks install and uninstall while zapfast.exe or the legacy process is running.
A Windows MSI changes its upgrade identityUpdates can create duplicate products or fail to take over old installsThe fixed UpgradeCode is shared with winget and the installer lifecycle test checks one registered product.
A user prefix contains spaces or shell-significant charactersThe desktop launcher can treat the path as the wrong executable or argumentsThe user-install test checks escaped absolute Exec values for space, percent, and backslash prefixes.
A macOS app loses its established bundle identity or graphics settingExisting paired-device state can be hidden, or a graphics switch can leave windows blankBundle tests check the stable identifier and automatic graphics switching metadata.
A macOS app lacks a valid signature, ticket, or permission metadataGatekeeper or camera and microphone access can fail for usersThe final DMG is mounted and checked with stapler, codesign, spctl, architecture, and metadata checks.
Flatpak source and release manifests driftFlathub and release bundles expose different permissions or app identityPackaging tests compare the sandbox fields and app metadata across both manifests.
Flatpak catalog metadata omits the current release or launch targetA package can be present while the software catalog shows stale release information or cannot launch itThe AppStream metainfo keeps the release link and desktop launchable aligned with the package identity.

Key files

FileWhy to read it
native-packages.yamlDefines the cross-platform package targets, dependencies, contents, formats, and downstream recipe destinations.
.github/…/release.ymlShows how Linux, macOS, Windows, and Flatpak artifacts are built, signed, verified, and uploaded.
.github/…/packaging.ymlShows clean Linux installation checks, AppImage execution, Windows installer packaging, and user-install validation.
PACKAGING.mdGives the maintainer-level platform contracts, supported runtime floors, signing boundaries, and package-manager delivery rules.
packaging/windows/zapfast.wxsDescribes the per-user MSI's install, upgrade, legacy takeover, shortcut, and running-process behavior.
packaging/windows/test-installer.ps1Demonstrates the Windows installation lifecycle that the CI test protects.
packaging/…/bundle.shShows the inputs that make the universal macOS application bundle.
packaging/macos/Info.plistDefines the stable macOS app identity, permission prompts, and graphics behavior carried by the bundle.
packaging/…/verify.shDefines the trust and permission checks applied to the DMG users receive.
tests/packaging_macos.rsProtects the macOS bundle identity, login agent, and graphics behavior expected by the application.
packaging/test-install.shDefines the clean-container Linux package install, runtime, desktop, removal, and data-preservation checks.
packaging/install-user.shShows the supported single-user Linux installation behavior and launcher generation.
packaging/…/rocks.zapfast.ZapFast.ymlDefines the source-built Flatpak sandbox and its user-facing permissions.
packaging/…/rocks.zapfast.ZapFast.metainfo.xmlDefines the Flatpak catalog identity, launch target, product description, and release links shown to users.
packaging/…/v0.21.3.mdShows how a release exposes direct artifact downloads and package-manager installation paths to users.