Skip to content

README

This page mirrors the GitHub README. For the full docs, use the sidebar.

An open-source Tauri v2 plugin that pushes OTA frontend updates to users instantly — without rebuilding the native binary, without app store review, and without requiring a cloud service. Self-hosted, bring your own CDN.

It works by swapping Tauri’s embedded asset provider at startup. The WebView keeps loading from tauri://localhost — the swap is invisible. Your keys, your server, your infrastructure. If anything goes wrong, the app rolls back to embedded assets on next launch.

PlatformSupported
macOS
Windows
Linux
Android
iOS🔜

src-tauri/Cargo.toml
[dependencies]
tauri-plugin-hotswap = "0.0.1"
Terminal window
npm install tauri-plugin-hotswap-api

Add to your tauri.conf.json:

{
"plugins": {
"hotswap": {
"endpoint": "https://your-server.com/api/updates/{{current_sequence}}",
"pubkey": "<YOUR_MINISIGN_PUBKEY>"
}
}
}
src-tauri/src/lib.rs
pub fn run() {
let context = tauri::generate_context!();
let (hotswap, context) = tauri_plugin_hotswap::init(context)
.expect("failed to initialize hotswap");
tauri::Builder::default()
.plugin(hotswap)
.run(context)
.expect("error running app");
}

In src-tauri/capabilities/default.json:

{
"identifier": "default",
"windows": ["main"],
"permissions": [
"core:default",
"hotswap:default"
]
}
import { checkUpdate, applyUpdate, notifyReady } from 'tauri-plugin-hotswap-api';
// Confirm current version works (call on every startup)
await notifyReady();
// Check for updates
const result = await checkUpdate();
if (result.available) {
// Download, verify, and activate
await applyUpdate();
// Reload to serve new assets
window.location.reload();
}

You can also change configuration at runtime:

import { configure } from 'tauri-plugin-hotswap-api';
// Switch to a beta channel at runtime
await configure({ channel: 'beta' });

FeatureDescription
Signed bundlesEvery download is verified with minisign before extraction
Auto-rollbackIf notifyReady() isn’t called, the next launch rolls back automatically
ChannelsRoute users to production, staging, beta — switchable at runtime
Custom headersAuth tokens, API keys — sent on every check and download request
Retry with backoffFailed downloads retry automatically (1s → 2s → 4s → 8s)
Download/activate splitDownload now, apply later — you control the timing
Lifecycle eventshotswap://lifecycle events for telemetry (Sentry, PostHog, etc.)
Platform-awareSends platform, arch, channel on every check request
HTTPS enforcedNon-HTTPS URLs rejected by default
Atomic operationsTemp dir extraction + rename for crash safety
Custom resolversHotswapResolver trait — bring your own update source
Zip supportEnable with features = ["zip"]

MIT OR Apache-2.0 (same as Tauri)