-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathCargo.toml
More file actions
161 lines (138 loc) · 5.6 KB
/
Copy pathCargo.toml
File metadata and controls
161 lines (138 loc) · 5.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[package]
name = "self_update"
version = "1.3.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"]
# Trust the OS certificate store instead of Mozilla's bundled roots, for the ureq client.
# Turn it on when your users sit behind a TLS-intercepting corporate proxy whose CA is installed
# in the machine's trust store: without it, every request fails to verify. It moves the ureq
# per-call agent from `RootCerts::WebPki` to `RootCerts::PlatformVerifier`; no effect on an
# injected `ureq::Agent`, which owns its own TLS config.
#
# A reqwest build needs nothing and is unaffected: reqwest 0.13's rustls setup already verifies
# through `rustls-platform-verifier`, and its native-tls setup uses the system store by
# definition. The `ureq?/` prefix means this feature is a no-op there, pulling in nothing.
# See CORP-2 in specs/corporate-network-config.md.
native-certs = ["ureq?/platform-verifier"]
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"]