binstalk-fetchers: Add feature quickinstall (#1315)

Also fixed `package.metadata.docs.rs` for `binstalk-registry`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-08-24 10:05:27 +10:00 committed by GitHub
parent cb9cb0e937
commit 6cc22b2c51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 2 deletions

View file

@ -29,3 +29,10 @@ url = "2.3.1"
[dev-dependencies]
binstalk-downloader = { version = "0.7.0", path = "../binstalk-downloader" }
[features]
quickinstall = []
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
all-features = true

View file

@ -7,7 +7,7 @@ use binstalk_downloader::gh_api_client::{GhReleaseArtifact, HasReleaseArtifact};
pub(super) use binstalk_downloader::{
download::{Download, ExtractedFiles},
gh_api_client::GhApiClient,
remote::{Client, Method, Url},
remote::{Client, Url},
};
pub(super) use binstalk_types::cargo_toml_binstall::{PkgFmt, PkgMeta};
pub(super) use compact_str::CompactString;

View file

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
use std::{path::Path, sync::Arc};
use binstalk_downloader::{
@ -10,7 +12,9 @@ pub use url::ParseError as UrlParseError;
mod gh_crate_meta;
pub use gh_crate_meta::*;
#[cfg(feature = "quickinstall")]
mod quickinstall;
#[cfg(feature = "quickinstall")]
pub use quickinstall::*;
mod common;

View file

@ -1,5 +1,6 @@
use std::{path::Path, sync::Arc};
use binstalk_downloader::remote::Method;
use binstalk_types::cargo_toml_binstall::{PkgFmt, PkgMeta};
use tokio::sync::OnceCell;
use url::Url;

View file

@ -44,3 +44,4 @@ crates_io_api = []
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
all-features = true

View file

@ -12,7 +12,7 @@ license = "GPL-3.0-only"
[dependencies]
binstalk-bins = { version = "0.0.0", path = "../binstalk-bins" }
binstalk-downloader = { version = "0.7.0", path = "../binstalk-downloader", default-features = false, features = ["gh-api-client"] }
binstalk-fetchers = { version = "0.0.0", path = "../binstalk-fetchers" }
binstalk-fetchers = { version = "0.0.0", path = "../binstalk-fetchers", features = ["quickinstall"] }
binstalk-registry = { version = "0.0.0", path = "../binstalk-registry" }
binstalk-types = { version = "0.5.0", path = "../binstalk-types" }
cargo-toml-workspace = { version = "1.0.0", path = "../cargo-toml-workspace" }