tauri-plugin-hdiff-update
Tauri v2 plugin for signed HDiffPatch differential installer updates.
Install
[]
= "0.1"
Register the plugin:
default
.plugin
Enable the production permission set:
"hdiff-update:default"
The default permission only exposes the production update path:
download_and_applydownload_and_install
The release-lab commands are intentionally excluded from the default permission set.
Frontend Command
import { Channel, invoke } from "@tauri-apps/api/core";
const onEvent = new Channel();
onEvent.onmessage = (event) => console.log(event);
await invoke("plugin:hdiff-update|download_and_install", {
options: {
update: {
manifestUrl: "https://updates.example.com/latest.json",
currentVersion: "0.1.0",
currentArtifactPath: "C:\\ProgramData\\xCodex\\installers\\xCodex_0.1.0.exe",
hpatchzPath: "C:\\Program Files\\xCodex\\resources\\bin\\hpatchz.exe",
signaturePublicKey: "base64-ed25519-public-key",
requireSignature: true,
headers: [{ name: "Authorization", value: "Bearer short-lived-token" }],
},
installerArgs: [],
},
onEvent,
});