Skip to main content

hdiff_update_core/
lib.rs

1//! Core library for signed HDiffPatch-based differential application updates.
2//!
3//! The crate contains manifest selection, Ed25519 signing and verification,
4//! hashing, downloads, and process wrappers for `hdiffz` and `hpatchz`.
5//! It does not bundle HDiffPatch binaries.
6
7mod download;
8mod error;
9mod hash;
10mod manifest;
11mod security;
12mod tool;
13mod update;
14
15pub use download::{
16    download_to_file, read_url_to_string, DownloadEvent, DownloadStats, HttpHeader,
17};
18pub use error::{Error, Result};
19pub use hash::{sha256_bytes, sha256_file, verify_sha256, FileDigest};
20pub use manifest::{
21    default_platform, Artifact, DeltaArtifact, ManifestSignature, PlatformRelease,
22    SelectedArtifact, UpdateManifest, MANIFEST_SIGNATURE_ALGORITHM,
23};
24pub use security::{
25    generate_update_keypair, sign_manifest, verify_manifest_signature, UpdateKeypair,
26};
27pub use tool::{
28    apply_patch, create_patch, inspect_diff, resolve_tool_path, ApplyPatchOptions,
29    CreatePatchOptions, PatchApplyResult, PatchCreateResult, ToolOutput, DEFAULT_ALGORITHM,
30};
31pub use update::{
32    load_update_manifest, prepare_delta_update, prepare_update, PrepareUpdateOptions,
33    PreparedUpdate, PreparedUpdateKind,
34};