cargo-binstall/crates/binstalk/src/helpers.rs
Jiahao XU dc77a1ab93
Refactor: Extract new crate simple-git (#1304)
`binstalk-downloader` contains stuff about http(s) before the
git code is moved into it and now it becomes http and git.

While git indeed uses http stuff, which is why I decided to put
it into binstalk-downloader, it is more than just downloading
since it is stateful (can be cached locally and updated)
where as http is stateless.

Also `binstalk-downloader`'s codegen time now increases
dramatically and it also creates extra dependencies for
binstalk-fetchers, delaying its execution.

The git code also don't use anything from `binstalk-downloader`
at all, it makes sense to be an independent crate.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-19 01:08:55 +00:00

15 lines
430 B
Rust

pub mod jobserver_client;
pub mod remote;
pub(crate) mod target_triple;
pub mod tasks;
pub(crate) use binstalk_downloader::download;
pub use binstalk_downloader::gh_api_client;
pub(crate) use cargo_toml_workspace::{self, cargo_toml};
#[cfg(feature = "git")]
pub(crate) use simple_git as git;
pub(crate) fn is_universal_macos(target: &str) -> bool {
["universal-apple-darwin", "universal2-apple-darwin"].contains(&target)
}