MainSDK
Search⌘K
Integrations

Tauri

Use the Tauri updater for MainSDK desktop app updates - signed updates, update manifests, minimum versions on the server, main.yaml and testing.

1 interface1 driverWritten guide
Updated 2026-10-28

The Tauri driver serves updates for desktop apps built with Tauri, through Tauri's updater plugin. Updates are signed and install silently or after a prompt; versions you block show an "Update required" screen and your server refuses them. Pick it when your desktop app is built with Tauri, which is MainSDK's first desktop target.

Interfaces it serves

Pick Tauri in main.yaml for any of these. Your calls stay the same, and you can swap later.

Before you start

  1. Add the updater plugin to your Tauri app, following Tauri's updater guide.
  2. Generate an update signing key pair with the Tauri CLI. The public key goes in your Tauri configuration and ships inside the app; the private key signs each release. The updater refuses an update whose signature does not verify.
  3. Keep the private key out of the repo. Put it and its password in your secrets manager or CI secrets, and sign in CI.
  4. Host the update metadata. The updater reads an endpoint that describes the latest version, its download URLs and signatures; serve it from your release host.

Configure

Set the driver for your desktop build:

main.yaml
updates:
  driver: tauri
  # [to be decided] the desktop target's name in main.yaml, and how the update endpoint, silent or prompted mode and the minimum version are declared

The signing key is used when you build releases, not by your running app. If a MainSDK setting ever needs it, it goes in as secret:TAURI_SIGNING_PRIVATE_KEY (suggested name), never as a literal.

Use it

src/startup.ts
import { updates } from "mainsdk";

export async function onStartup() {
  const u = await updates.check();
  if (u.required) showUpdateScreen(u);   // blocked version: update before continuing
}

updates.minVersion() sets the oldest version you still accept. The change is audited and the server refuses older versions. Its arguments arrive with the spec.

Local development and testing

  • Try the flow locally: build two signed versions and point the updater at a local endpoint that advertises the newer one.
  • Tests: createTestApp() from @mainsdk/testing runs updates on an in-memory fake, and chaos.on("updates", { outage: true }) simulates the update endpoint being down. Helpers to set a minimum version on the fake arrive with the spec.

What MainSDK adds on top

  • Signed updates only.
  • Blocking enforced by the server as well as the app, so a patched binary cannot skip it.
  • Blocked users can still export their data.
  • Every change to the minimum version audited.

See App updates and version blocking for the full contract.

Limits and notes

  • Planned driver, not in a spec yet: updates is phase 2, and desktop targets are phase 3.
  • Desktop builds should also be code-signed and notarized for each operating system; that is separate from update signing.
  • If you lose the update signing key, installed apps cannot verify new updates. Back it up.
  • Electron apps are supported as a desktop target; an Electron updater driver is not in the catalog yet.

Swap to or from it

main.yaml
updates:
  driver: tauri   # was expo-updates

Your updates.check() and updates.minVersion() calls stay the same.

FAQ

Why must Tauri updates be signed? The updater checks each download against the public key built into the app, so an attacker who controls the download host still cannot push a build.

Silent or prompted? Both are supported by the design. How you choose between them in main.yaml is not decided yet.

Next

Open questions

Was this page helpful?

↑↓ moveEnter openEsc close

Not decided yet