mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-04 19:20:03 +00:00
Refactor: Move mod git
into binstalk-downloader
(#1285)
To speedup codegen time for `binstalk`, also fixed the docs.rs build for `binstalk-downloader`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
6a1d317fde
commit
c57356e870
7 changed files with 14 additions and 7 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -243,7 +243,6 @@ dependencies = [
|
||||||
"compact_str",
|
"compact_str",
|
||||||
"detect-targets",
|
"detect-targets",
|
||||||
"either",
|
"either",
|
||||||
"gix",
|
|
||||||
"glob",
|
"glob",
|
||||||
"home",
|
"home",
|
||||||
"itertools",
|
"itertools",
|
||||||
|
@ -286,6 +285,7 @@ dependencies = [
|
||||||
"flate2",
|
"flate2",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"generic-array",
|
"generic-array",
|
||||||
|
"gix",
|
||||||
"httpdate",
|
"httpdate",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"quinn 0.10.2",
|
"quinn 0.10.2",
|
||||||
|
|
|
@ -20,6 +20,7 @@ compact_str = "0.7.0"
|
||||||
flate2 = { version = "1.0.26", default-features = false }
|
flate2 = { version = "1.0.26", default-features = false }
|
||||||
futures-util = "0.3.28"
|
futures-util = "0.3.28"
|
||||||
generic-array = "0.14.7"
|
generic-array = "0.14.7"
|
||||||
|
gix = { version = "0.51.0", features = ["blocking-http-transport-reqwest-rust-tls"], optional = true }
|
||||||
httpdate = "1.0.2"
|
httpdate = "1.0.2"
|
||||||
reqwest = { version = "0.11.18", features = ["stream", "gzip", "brotli", "deflate"], default-features = false }
|
reqwest = { version = "0.11.18", features = ["stream", "gzip", "brotli", "deflate"], default-features = false }
|
||||||
percent-encoding = "2.2.0"
|
percent-encoding = "2.2.0"
|
||||||
|
@ -91,6 +92,9 @@ cross-lang-fat-lto = ["zstd/fat-lto"]
|
||||||
gh-api-client = ["json"]
|
gh-api-client = ["json"]
|
||||||
json = ["serde", "serde_json"]
|
json = ["serde", "serde_json"]
|
||||||
|
|
||||||
|
git = ["dep:gix"]
|
||||||
|
git-max-perf = ["gix?/max-performance"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
features = ["gh-api-client", "git"]
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
|
@ -12,4 +12,7 @@ pub mod gh_api_client;
|
||||||
|
|
||||||
pub mod remote;
|
pub mod remote;
|
||||||
|
|
||||||
|
#[cfg(feature = "git")]
|
||||||
|
pub mod git;
|
||||||
|
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
|
@ -19,7 +19,6 @@ command-group = { version = "2.1.0", features = ["with-tokio"] }
|
||||||
compact_str = { version = "0.7.0", features = ["serde"] }
|
compact_str = { version = "0.7.0", features = ["serde"] }
|
||||||
detect-targets = { version = "0.1.10", path = "../detect-targets" }
|
detect-targets = { version = "0.1.10", path = "../detect-targets" }
|
||||||
either = "1.8.1"
|
either = "1.8.1"
|
||||||
gix = { version = "0.51.0", features = ["blocking-http-transport-reqwest-rust-tls"], optional = true }
|
|
||||||
glob = "0.3.1"
|
glob = "0.3.1"
|
||||||
home = "0.5.5"
|
home = "0.5.5"
|
||||||
itertools = "0.11.0"
|
itertools = "0.11.0"
|
||||||
|
@ -53,8 +52,8 @@ windows = { version = "0.48.0", features = ["Win32_Storage_FileSystem", "Win32_F
|
||||||
[features]
|
[features]
|
||||||
default = ["static", "rustls", "git"]
|
default = ["static", "rustls", "git"]
|
||||||
|
|
||||||
git = ["dep:gix"]
|
git = ["binstalk-downloader/git"]
|
||||||
git-max-perf = ["gix?/max-performance"]
|
git-max-perf = ["binstalk-downloader/git-max-perf"]
|
||||||
|
|
||||||
static = ["binstalk-downloader/static"]
|
static = ["binstalk-downloader/static"]
|
||||||
pkg-config = ["binstalk-downloader/pkg-config"]
|
pkg-config = ["binstalk-downloader/pkg-config"]
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
pub(crate) mod cargo_toml_workspace;
|
pub(crate) mod cargo_toml_workspace;
|
||||||
pub(crate) mod futures_resolver;
|
pub(crate) mod futures_resolver;
|
||||||
#[cfg(feature = "git")]
|
|
||||||
pub(crate) mod git;
|
|
||||||
pub mod jobserver_client;
|
pub mod jobserver_client;
|
||||||
pub mod remote;
|
pub mod remote;
|
||||||
pub mod signal;
|
pub mod signal;
|
||||||
|
@ -11,6 +9,9 @@ pub mod tasks;
|
||||||
pub use binstalk_downloader::gh_api_client;
|
pub use binstalk_downloader::gh_api_client;
|
||||||
pub(crate) use binstalk_downloader::{bytes, download};
|
pub(crate) use binstalk_downloader::{bytes, download};
|
||||||
|
|
||||||
|
#[cfg(feature = "git")]
|
||||||
|
pub(crate) use binstalk_downloader::git;
|
||||||
|
|
||||||
pub(crate) fn is_universal_macos(target: &str) -> bool {
|
pub(crate) fn is_universal_macos(target: &str) -> bool {
|
||||||
["universal-apple-darwin", "universal2-apple-darwin"].contains(&target)
|
["universal-apple-darwin", "universal2-apple-darwin"].contains(&target)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue