Skip to content

shayyz-code/tauri-latest-json

tauri-latest-json

Crates.io docs.rs License Crates.io

Generate a latest.json file for Tauri auto-updates, supporting multi-platform builds (Windows, macOS Intel/ARM, Linux).

This crate scans your Tauri bundle directory for installers and outputs a valid latest.json for the Tauri Updater.

Features

  • Detects installers: .msi, .exe, .dmg (Intel/ARM), .AppImage, .deb, .rpm, .tar.gz
  • Auto-detects platform keys from filenames
  • Reads version from package.json or Cargo.toml
  • Generates a single multi-platform latest.json
  • Works as both a library and a CLI

Install

Library:

[dependencies]
tauri-latest-json = "0.2.4"

CLI:

cargo install tauri-latest-json

CLI Usage

tauri-latest-json <download_url_base> <notes>

Notes can contain spaces without quotes; all remaining args are combined.

Example:

tauri-latest-json https://example.com/downloads Initial release with details

latest.json is written to the current working directory.

Optional signature verification

Enable compile-time verification of signatures using the Tauri CLI:

cargo install tauri-cli
cargo run --features verify-signature -- <download_url_base> <notes>

Library Usage

use tauri_latest_json::generate_latest_json_auto;

fn main() {
    let download_url = "https://example.com/downloads";
    let notes = "Initial release";
    generate_latest_json_auto(download_url, notes).unwrap();
}

Example

cargo run --example basic

If the paths are correct, you’ll see:

✅ latest.json generated successfully

Requirements

pnpm tauri signer generate -w ~/.tauri/myapp.key

Platform Detection

File Extension Platform Key
.msi, .exe windows-x86_64
.dmg (Intel) darwin-x86_64
.dmg (ARM) darwin-aarch64
.AppImage, .deb, .rpm, .tar.gz (x64) linux-x86_64
.AppImage, .deb, .rpm, .tar.gz (ARM) linux-aarch64

Contributing

See CONTRIBUTING.md. Please also read our Code of Conduct.

License

MIT — see LICENSE.

About

Simply generates the `latest.json` file for auto-updates with Updater from Tauri v2 Applications, supporting multi-platform builds (Windows, macOS Intel/ARM, Linux).

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Languages