generated from EmbarkStudios/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Cargo.toml
101 lines (92 loc) · 3.36 KB
/
Cargo.toml
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
[package]
name = "tame-index"
version = "0.16.0"
edition = "2021"
rust-version = "1.67.0"
description = "Provides access to local and remote cargo registry indices"
license = "Apache-2.0 OR MIT"
documentation = "https://docs.rs/tame-index"
homepage = "https://github.com/EmbarkStudios/tame-index"
repository = "https://github.com/EmbarkStudios/tame-index"
[features]
default = ["reqwest?/rustls-tls-webpki-roots"]
# Enables the built-in support for fetching and reading a git registry index
git = ["gix-reqwest"]
# The default is reqwest since that doesn't pull in (a ton of) C code
gix-reqwest = ["gix/blocking-http-transport-reqwest", "dep:reqwest", "__git"]
# Unfortunately need to support curl as well, though we don't test or care about it, in addition
# to having 2 HTTP client implementations if sparse is also enabled
gix-curl = ["gix/blocking-http-transport-curl", "__git"]
# "private" feature flag which is the one actually used in code
__git = []
# Enables the built-in support for requesting index entries from a HTTP sparse registry index
sparse = ["dep:reqwest", "dep:tokio", "dep:rayon", "dep:crossbeam-channel"]
# Enables local registry support
local = ["dep:sha2", "dep:bytes"]
# Enables helpers for building a local registry
local-builder = ["local", "dep:reqwest"]
# Enables the use of OS native certificate store.
# Should be used with `default-features = false` to also disable webpki-roots, which is activated by default.
native-certs = ["reqwest?/rustls-tls-native-roots"]
# We can't use all-features because of gix-curl, so this is just an alias for my sanity
__internal_all = ["git", "sparse", "local-builder"]
[dependencies]
bytes = { version = "1.8", optional = true }
# All paths are assumed to be utf-8 for ease of use and implementation
camino = "1.1"
# Better channels, already a dep if rayon is pulled in
crossbeam-channel = { version = "0.5", optional = true }
# Used to find the location of the local `CARGO_HOME`
home = "0.5"
# Allows calling crates to provide their own HTTP implementation, keep aligned with reqwest/hyper
http = "1.1"
# Nicer scanning through bytes
memchr = "2.5"
rayon = { version = "1.7", optional = true }
# Nicer versions for users
semver = { version = "1.0", features = ["serde"] }
# Serialization
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
sha2 = { version = "0.10", optional = true, default-features = false, features = [
"std",
] }
# Smaller fixed size strings with heap fallback
smol_str = { version = "0.3", features = ["serde"] }
# Laziness
thiserror = "2.0"
tokio = { version = "1.41", default-features = false, features = [
"rt-multi-thread",
"time",
], optional = true }
# cargo config parsing
toml-span = "0.3"
# Faster hashing
twox-hash = { version = "2.0", default-features = false, features = ["xxhash64"] }
[dependencies.gix]
optional = true
version = "0.68"
default-features = false
features = []
# Keep version aligned with gix-transport
[dependencies.reqwest]
optional = true
version = "0.12.7"
default-features = false
features = ["blocking", "gzip", "http2"]
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[dev-dependencies]
cargo_metadata = "0.19"
rayon = "1.7"
tempfile = "3.14"
tiny-bench = "0.4"
[package.metadata.docs.rs]
features = ["__internal_all"]
rustdoc-args = ["--cfg", "docsrs"]
[profile.dev.package.sha2]
opt-level = 3
[[bench]]
name = "sparse"
harness = false
required-features = ["sparse"]