-
-
Notifications
You must be signed in to change notification settings - Fork 477
Expand file tree
/
Copy pathCargo.toml
More file actions
139 lines (121 loc) · 5.83 KB
/
Cargo.toml
File metadata and controls
139 lines (121 loc) · 5.83 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
lints.workspace = true
[package]
name = "gix-transport"
version = "0.57.0"
repository = "https://github.com/GitoxideLabs/gitoxide"
license = "MIT OR Apache-2.0"
description = "A crate of the gitoxide project dedicated to implementing the git transport layer"
authors = ["Sebastian Thiel <[email protected]>"]
edition = "2024"
include = ["/src/**/*", "/LICENSE-*"]
rust-version = "1.85"
[lib]
doctest = false
[features]
default = []
## If set, blocking implementations of the typical git transports become available in `crate::client::blocking_io`
blocking-client = ["gix-packetline/blocking-io"]
## Implies `blocking-client`, and adds support for the http and https transports.
http-client = [
"base64",
"gix-features/io-pipe",
"blocking-client",
"gix-credentials",
]
## Implies `http-client`, and adds support for the http and https transports using the Rust bindings for `libcurl`.
##
## If used in conjunction with other blocking implementations like `http-client-reqwest`, this one takes precedence.
http-client-curl = ["curl", "http-client"]
## Implies `http-client-curl` and enables `rustls` for creating `https://` connections.
## If used in conjunction with `http-client-curl-openssl`, this feature will take precedence.
http-client-curl-rust-tls = ["http-client-curl", "curl/rustls"]
## Implies `http-client-curl` and enables `ssl` for creating `https://` connections.
## If used in conjunction with `http-client-curl-rust-tls`, the `rust-tls` feature will take precedence.
http-client-curl-openssl = ["http-client-curl", "curl/ssl"]
## Implies `http-client` and adds support for http transports using the blocking version of `reqwest`.
## NOTE: `https://` is NOT supported by default. You must enable one of the `http-client-reqwest-rust-tls`
## or `http-client-reqwest-native-tls` features to enable HTTPS support.
http-client-reqwest = ["reqwest", "http-client"]
## Stacks with `http-client-reqwest` and enables `https://` via the `rustls` crate.
http-client-reqwest-rust-tls = ["http-client-reqwest", "reqwest/rustls"]
## Stacks with `http-client-reqwest` and enables `https://` via the `rustls` crate.
## This also makes use of `trust-dns` to avoid `getaddrinfo`, but note it comes with its own problems.
http-client-reqwest-rust-tls-trust-dns = [
"http-client-reqwest",
"reqwest/rustls",
"reqwest/hickory-dns",
]
## Stacks with `http-client-reqwest` and enables `https://` via the `native-tls` crate.
http-client-reqwest-native-tls = ["http-client-reqwest", "reqwest/native-tls"]
## Allows sending credentials over cleartext HTTP. For testing purposes only.
http-client-insecure-credentials = []
## If set, an async implementations of the git transports becomes available in `crate::client::async_io`.
## Suitable for implementing your own transports while using git's way of communication, typically in conjunction with a custom server.
## **Note** that the _blocking_ client has a wide range of available transports, with the _async_ version of it supporting only the TCP based `git` transport leaving you
## with the responsibility to providing such an implementation of `futures-io::AsyncRead/AsyncWrite` yourself.
async-client = [
"gix-packetline/async-io",
"async-trait",
"futures-lite",
"futures-io",
"pin-project-lite",
]
#! ### Other
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
serde = ["dep:serde", "bstr/serde"]
[[test]]
name = "blocking-transport"
path = "tests/blocking-transport.rs"
required-features = ["blocking-client", "http-client-insecure-credentials", "maybe-async/is_sync"]
[[test]]
name = "blocking-transport-http-only"
path = "tests/blocking-transport-http.rs"
required-features = ["http-client-curl", "http-client-insecure-credentials", "maybe-async/is_sync"]
[[test]]
name = "async-transport"
path = "tests/async-transport.rs"
required-features = ["async-client"]
[dependencies]
gix-command = { version = "^0.9.0", path = "../gix-command" }
gix-features = { version = "^0.48.0", path = "../gix-features" }
gix-url = { version = "^0.36.0", path = "../gix-url" }
gix-sec = { version = "^0.14.0", path = "../gix-sec" }
gix-packetline = { version = "^0.21.3", path = "../gix-packetline" }
gix-credentials = { version = "^0.38.0", path = "../gix-credentials", optional = true }
gix-quote = { version = "^0.7.1", path = "../gix-quote" }
serde = { version = "1.0.114", optional = true, default-features = false, features = [
"std",
"derive",
] }
bstr = { version = "1.12.0", default-features = false, features = [
"std",
"unicode",
] }
thiserror = "2.0.18"
# for async-client
async-trait = { version = "0.1.51", optional = true }
futures-io = { version = "0.3.32", optional = true }
futures-lite = { version = "2.1.0", optional = true }
pin-project-lite = { version = "0.2.6", optional = true }
# for http-client
base64 = { version = "0.22.1", optional = true }
# for http-client-curl. Additional configuration should be performed on higher levels of the dependency tree.
curl = { version = "0.4", optional = true, default-features = false }
# for http-client-reqwest
# all but the 'default-tls' feature
reqwest = { version = "0.13.2", optional = true, default-features = false, features = ["blocking", "charset", "http2"] }
## If used in conjunction with `async-client`, the `connect()` method will become available along with supporting the git protocol over TCP,
## where the TCP stream is created using this crate.
async-std = { version = "1.12.0", optional = true }
document-features = { version = "0.2.0", optional = true }
[dev-dependencies]
gix-pack = { path = "../gix-pack", default-features = false, features = [
"sha1",
"streaming-input",
] }
gix-hash = { path = "../gix-hash", features = ["sha1"] }
async-std = { version = "1.9.0", features = ["attributes"] }
maybe-async = "0.2.6"
blocking = "1.6.2"
[package.metadata.docs.rs]
features = ["http-client-curl", "document-features", "serde"]