Skip to content

add manifest backend for static JSON release manifests#195

Merged
jaemk merged 1 commit into
masterfrom
260717.manifest-backend
Jul 19, 2026
Merged

add manifest backend for static JSON release manifests#195
jaemk merged 1 commit into
masterfrom
260717.manifest-backend

Conversation

@jaemk

@jaemk jaemk commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Closes #74.

  • Add a manifest feature (no new dependencies) gating backends::manifest: update from a static manifest.json served by any plain file server (S3 static hosting, a CDN, GitHub Pages, nginx), with no forge-specific API.
  • ManifestSource implements ReleaseSource (and AsyncReleaseSource under async); the manifest::Update::configure() facade mirrors the other backends' builders, with sync and AsyncUpdate variants.
  • Manifest schema 1 is the only accepted version; any other schema fails with Error::InvalidResponse naming the version. Unknown fields are ignored for forward compatibility.
  • Resolve relative asset urls against the manifest URL's directory; absolute urls pass through. Skip non-semver version entries with a debug log, same as the forge backends.
  • Map asset digest values (sha256:<hex>) to ReleaseAsset::digest(); they plug into the existing release-digest verification (checksums feature).
  • Add specs/ref-manifest-backend.md (the manifest format contract), examples/manifest.rs, and the manifest feature to all Makefile CI lanes.

Usage:

self_update::backends::manifest::Update::configure()
    .manifest_url("https://example.net/releases/manifest.json")
    .bin_name("app")
    .current_version(cargo_crate_version!())
    .build()?
    .update()?;

See specs/ref-manifest-backend.md for the manifest schema and examples/manifest.rs for a runnable example.

- new `manifest` feature (no new deps) gating `backends::manifest`:
  `ManifestSource` implements `ReleaseSource` (and `AsyncReleaseSource` under
  `async`), fetching a `manifest.json` from any static file server and mapping
  it through the public `ReleaseBuilder`. (#74)
- schema 1 is the only accepted version; any other `schema` value fails with
  `Error::InvalidResponse` naming the version. Unknown fields are ignored for
  forward compatibility.
- relative asset urls resolve against the manifest URL's directory; absolute
  urls pass through. Non-semver `version` entries are skipped with a debug log
  (same as the forge backends). Asset `digest` values map to
  `ReleaseAsset::digest()` and plug into release-digest verification.
- `manifest::Update::configure()` facade mirrors the other backends' builders,
  with sync and `AsyncUpdate` variants; transport setters apply to both the
  manifest fetch and the asset download.
- new spec specs/ref-manifest-backend.md; example examples/manifest.rs; the
  `manifest` feature added to all Makefile CI lanes.
@jaemk
jaemk force-pushed the 260717.manifest-backend branch from 993085b to c793ed2 Compare July 19, 2026 22:15
@jaemk
jaemk merged commit 16bcc44 into master Jul 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regular https directory backend

1 participant