self_update 1.0.0

Self updates for standalone executables
Documentation
[package]
name = "self_update"
version = "1.0.0"
description = "Self updates for standalone executables"
repository = "https://github.com/jaemk/self_update"
keywords = ["update", "upgrade", "download", "release"]
categories = ["command-line-utilities"]
license = "MIT"
readme = "README.md"
authors = ["James Kominick <james@kominick.com>"]
exclude = ["/ci/*", ".travis.yml", "appveyor.yml"]
edition = "2024"
rust-version = "1.88"

[package.metadata.docs.rs]
features = [
  "reqwest",
  "ureq",
  "native-tls",
  "archive-zip",
  "compression-zip-bzip2",
  "compression-zip-deflate",
  "archive-tar",
  "compression-tar-gz",
  "compression-tar-xz",
  "signatures",
  "checksums",
  "s3-auth",
  "async",
  "progress-bar",
  "github",
  "gitlab",
  "gitea",
  "gitee",
  "manifest",
  "s3",
]
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tempfile = "3"
flate2 = { version = "1", optional = true }
lzma-rs = { version = "0.3", optional = true }
tar = { version = "0.4", optional = true }
semver = "1.0"
zip = { version = "8", default-features = false, features = ["time"], optional = true }
indicatif = { version = "0.18", optional = true }
quick-xml = { version = "0.41", optional = true }
regex = "1"
log = "0.4"
urlencoding = "2.1"
self-replace = "1"
zipsign-api = { version = "0.2", default-features = false, optional = true }

http = "1"

reqwest = { version = "0.13", default-features = false, optional = true, features = ["blocking", "json", "http2"] }

ureq = { version = "3.0.6", optional = true, default-features = false, features = ["gzip", "json", "socks-proxy", "charset"]}

hmac = { version = "0.13", optional = true }
percent-encoding = { version = "2.3.2", optional = true }
sha2 = { version = "0.11.0", optional = true }
time = { version = "0.3.45", optional = true }
url = { version = "2.5.8", optional = true }

tokio = { version = "1", optional = true, default-features = false, features = ["time"] }
futures-util = { version = "0.3", optional = true, default-features = false, features = ["std"] }
# Direct dep for the async response trait's `bytes_stream` chunk type (already a transitive reqwest
# dep); gated under `async`.
bytes = { version = "1", optional = true }

[dev-dependencies]
tokio = { version = "1", default-features = false, features = ["macros", "rt-multi-thread", "time"] }
serde_json = "1"
zipsign-api = { version = "0.2", default-features = false, features = ["sign-tar", "sign-zip"] }

[features]
default = ["reqwest", "rustls", "progress-bar", "github", "archive-tar", "compression-tar-gz"]

archive-zip = ["zip", "zipsign-api?/verify-zip"]
compression-zip-bzip2 = ["archive-zip", "zip/bzip2"]
compression-zip-deflate = ["archive-zip", "zip/deflate"]
archive-tar = ["tar", "zipsign-api?/verify-tar"]
compression-tar-gz = ["archive-tar", "flate2"]
compression-tar-xz = ["archive-tar", "dep:lzma-rs"]
signatures = ["dep:zipsign-api"]
checksums = ["dep:sha2"]

progress-bar = ["dep:indicatif"]
github = []
gitlab = []
gitea = []
gitee = []
# Service-agnostic backend: update from a static JSON release manifest served over HTTP(S). Uses
# the already-present serde/serde_json deps, so it pulls in nothing new.
manifest = []
s3 = ["dep:quick-xml"]

# Async update API (tokio-only, reqwest-only). Adds `*_async` verbs alongside the unchanged
# blocking API. ureq has no async story, so this requires the `reqwest` client.
async = ["reqwest", "reqwest?/stream", "dep:tokio", "dep:futures-util", "dep:bytes"]


native-tls = ["reqwest?/native-tls", "ureq?/native-tls"]
# Vendored OpenSSL: build OpenSSL from source and link it statically, for targets where a usable
# system OpenSSL is awkward to obtain (musl, some cross-compiles). Implies `native-tls`. Applies to
# the reqwest client; a ureq-only build gets `native-tls` (system OpenSSL) without vendoring.
native-tls-vendored = ["native-tls", "reqwest?/native-tls-vendored"]
rustls = ["reqwest?/rustls", "ureq?/rustls"]

reqwest = ["dep:reqwest"]
ureq = ["dep:ureq"]

# The s3 backend is gated behind the `s3` feature; private-bucket request signing additionally
# needs `s3-auth` (which implies `s3`).
s3-auth = ["s3", "dep:hmac", "dep:percent-encoding", "dep:sha2", "dep:url", "dep:time"]

# Each backend example only builds when its backend feature is enabled, so a default
# (github-only) `cargo test` does not try to compile the gitlab/gitea/s3 examples. The `custom`
# example builds unconditionally (the custom backend is always compiled).
[[example]]
name = "github"
required-features = ["github"]

[[example]]
name = "gitlab"
required-features = ["gitlab"]

[[example]]
name = "gitea"
required-features = ["gitea"]

[[example]]
name = "gitee"
required-features = ["gitee"]

[[example]]
name = "s3"
required-features = ["s3"]

[[example]]
name = "manifest"
required-features = ["manifest"]

[[example]]
name = "embedded_key"
required-features = ["github", "signatures"]