4 releases
| new 0.2.4 | Mar 3, 2026 |
|---|---|
| 0.2.1 | Sep 29, 2025 |
| 0.2.0 | Aug 18, 2025 |
| 0.1.6 | Aug 18, 2025 |
#245 in Build Utils
17KB
188 lines
tauri-latest-json
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.jsonorCargo.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>
Example:
tauri-latest-json https://example.com/downloads "Initial release"
latest.json is written to the current working directory.
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
- Valid Tauri updater configuration (see the Tauri Updater docs)
- A Tauri signing key
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.
Dependencies
~1.5–4.5MB
~84K SLoC