Hi everyone!

I'd like to share tauri-plugin-updater-plus (v0.2.0), an Apache-2.0 licensed differential updater plugin and standalone CLI (blockmap-gen) for Tauri v3 applications.

Motivation

Out of the box, desktop app updaters typically download the entire release artifact on every update, even when only a small fraction of the binary or bundled assets changed. Traditional binary-diff schemes (bsdiff/xdelta) reduce bandwidth, but they force you to either maintain a dedicated patch server or pre-generate $N \times M$ patch files for every old-to-new version pair.

Electron's electron-updater avoids that operational overhead with .blockmap files and standard HTTP Range requests: you upload just the release artifact and a small gzip-compressed blockmap to any static host (GitHub Releases, S3/R2, Nginx, etc.), and the client reconstructs the new package locally by reusing unchanged chunks.

tauri-plugin-updater-plus brings that zero-backend, static-hosting-friendly differential update workflow to Tauri in pure Rust—and stays wire-compatible with Electron v2 .blockmap files and latest*.yml manifests.

How It Works

  1. Content-Defined Chunking (FastCDC): blockmap-gen splits release artifacts using a deterministic normalized FastCDC chunker (64-byte Gear rolling hash; default 16 KiB min / 64 KiB avg / 256 KiB max), hashes chunks with SHA-256 (aws-lc-rs), and emits a gzip-compressed Electron v2 .blockmap alongside the release manifest.
  2. Planning & Local Reuse: On the client, the updater compares the remote .blockmap against either the locally cached base package or—on Linux—the currently running $APPIMAGE directly. Unchanged blocks are copied and SHA-256-verified on the fly; if a cached local block is corrupted, only that block is re-fetched over HTTP Range rather than aborting the whole differential transfer.
  3. Hosting-Aware HTTP Range Transfer:
    • Uses multipart/byteranges (206 Partial Content) on static servers like Nginx/Caddy/Apache when supported, with small-gap range coalescing.
    • Automatically skips multi-range probes on known single-range object stores (GitHub Releases, S3, Cloudflare R2, GCS, OSS, Azure Blob) and degrades cleanly from multi-range → concurrent single-range → full download if a server responds with 200 OK or Accept-Ranges: none, or if the delta exceeds the configured threshold.
    • Reuses resolved 302 signed CDN URLs (e.g. objects.githubusercontent.com) across range requests, transparently re-resolves expired tokens, and strips Authorization/Cookie headers across origins.
  4. Defense-in-Depth Verification & Installation:
    • Streams SHA-512 verification (aws-lc-rs) and streaming minisign signature verification (with optional signed-version anti-replay checks in the trusted comment).
    • Enforces gzip-bomb limits when reading remote .blockmap files (falling back cleanly to a verified full download).
    • Runs native OS code-signing verification before installing: macOS codesign Designated Requirement checks and Windows Authenticode publisher checks.
    • Supports Linux (atomic AppImage replacement, .deb, .rpm), macOS (.zip, .app.tar.gz), and Windows (NSIS .exe, .msi, zipped installers).

Quick Look

Plugin setup (Tauri v3):

[dependencies] tauri-plugin-updater-plus = "0.2" 
tauri::Builder::default() .plugin(tauri_plugin_updater_plus::Builder::new().build()) 

Standalone CLI (blockmap-gen) — compiles with zero Tauri dependencies:

cargo install tauri-plugin-updater-plus --no-default-features --features cli # Generate a .blockmap and Tauri (or Electron) manifest blockmap-gen manifest \ --input MyApp-0.2.0.AppImage \ --version 0.2.0 \ --url https://example.com/MyApp-0.2.0.AppImage \ --format tauri \ --target linux-x86_64 \ --output latest.json # Measure differential savings between two releases blockmap-gen diff --old-blockmap v1.blockmap --new-blockmap v2.blockmap # Pack a macOS .app bundle into a per-entry deflated ZIP friendly to blockmap diffs blockmap-gen pack-zip --dir MyApp.app --output MyApp.app.zip 

It also supports both extended Tauri latest.json manifests and Electron latest*.yml (latest.yml, latest-linux.yml, latest-mac.yml) manifests, and includes a local HTTP benchmark example (cargo run --example benchmark_update --features plugin,cli -- <old_file> <new_file>) if you want to measure real wire savings on your own binaries.

Current Status & Caveats

  • Targets Tauri v3 (3.0.0-alpha.5), Rust 2024 edition (MSRV 1.95).
  • Tested with unit tests plus a Docker-based BDD suite (16 end-to-end scenarios covering real Nginx multipart ranges, simulated CDN redirects/token expiry, object-store fallback, minisign anti-replay, and gzip-bomb protection).

Feedback Welcome

I'd love to hear feedback from anyone building Tauri apps or working on binary distribution in Rust:

  • Are there any CDN/object-store HTTP Range quirks or enterprise proxy behaviors you've run into in production?
  • Would there be strong interest in a Tauri v2 compatibility layer/backport, or are most people planning around v3?
  • Any code review feedback on the Rust API, security verification flow, or platform installer edge cases is very welcome!

1 post - 1 participant

Read full topic