PixelCrusher is now a native macOS SwiftUI app backed by a Rust processing engine.
- Frontend (macOS): SwiftUI (
Sources/PixelCrusherMac/main.swift) - Backend/core: Rust (
crates/pixelcrusher-core) - Bridge: bundled Rust CLI (
pixelcrusher-cli) with JSON stdin/stdout status events - Bundled optimizers:
cjpeg,pngquant,pngcrush,svgo,gifsicle(+ optionalzopflipng) - Manual update check: “Check for Updates” button in the app options pane (queries GitHub Releases, no auto-update daemon)
The Tauri app path is used for Windows/Linux installers, while macOS release artifacts are produced by the SwiftUI packaging pipeline.
pixelcrusher/
Sources/PixelCrusherMac/ # SwiftUI macOS app
Sources/PixelCrusherMacCore/ # Swift-side queue, options, backend bridge, tool resolver
Tests/PixelCrusherMacCoreTests/ # Swift tests (resolver, backend invocation, bundle checks)
crates/pixelcrusher-core/ # Rust processing core + CLI binary (pixelcrusher-cli)
scripts/build_bundled_tools.sh # Bundles optimizer toolchain for native macOS app
scripts/prepare_tauri_bundled_tools.cjs # Builds bundled optimizer toolchain for Tauri win/linux
scripts/check_tauri_bundle_tools.cjs # Validates bundled tools are present in built win/linux bundles
scripts/build-macos.sh # Builds .app + .dmg (with /Applications symlink)
cargo test --manifest-path crates/pixelcrusher-core/Cargo.tomlswift testbash scripts/build-macos.shArtifacts are written to:
dist/PixelCrusher.appdist/PixelCrusher.dmgdist/PixelCrusher.zip
The DMG includes:
PixelCrusher.app/Applicationssymlink (drag-and-drop install flow)
Before building Tauri installers, prepare bundled tools and runtime:
npm run bundled-tools:prepareThis creates:
src-tauri/resources/BundledTools/bin/*(required binaries:cjpeg,pngquant,pngcrush,gifsicle,svgo)src-tauri/resources/BundledTools/node/bin/node- optional
zopflipngwhen available
Post-build verification:
npm run bundled-tools:check:linux
npm run bundled-tools:check:windowsIn the right-side Options pane, click Check for Updates.
Behavior:
- Calls GitHub API
repos/lubomirmolin/pixelcrusher/releases/latest - Parses semantic versions from the current app bundle version and release tag (supports
vX.Y.Z) - If a newer release exists: shows version + notes + Open Download
- If current version is latest: shows up-to-date confirmation
- No background polling / no automatic install
Workflows:
-
.github/workflows/ci-artifacts.yml- Trigger: pushes + pull requests
- Builds installer artifacts and uploads them as CI artifacts:
- macOS native:
.dmg,.zip - Windows (Tauri):
.msi,.exe(NSIS) - Linux (Tauri):
.AppImage,.deb
- macOS native:
-
.github/workflows/release.yml- Trigger: git tags matching
v*(for examplev1.2.0) - Builds all platform artifacts and publishes them to GitHub Releases
- Trigger: git tags matching
- Ensure version/tag is ready.
- Push a semver tag:
git tag v1.0.0
git push origin v1.0.0- GitHub Release is created/updated with generated notes + installer files.
At launch, the app resolves optimizer tools in this order:
PIXELCRUSHER_<TOOL>_PATHoverride- Bundled app tools (
BundledTools/bin/*) resolved from app resources (macOS app bundle + Tauri win/linux resources) - Host
PATH
Bundled tools directory override:
PIXELCRUSHER_BUNDLED_TOOLS_DIR
See THIRD_PARTY.md for bundled optimizer/runtime components and upstream license references.