mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 12:10:02 +00:00
feat: Add more variables for template (#1160)
Fixed #775 - Add dep target-lexicon v0.12.7 - Add `target-{family, arch, libc, vendor}` to `package.metadata.binstall`. For `{universal, universal2}-apple-darwin`, the `target-arch` is set to `universal`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
181b5293e7
commit
d8419ea5a2
10 changed files with 210 additions and 115 deletions
|
@ -11,7 +11,7 @@ use crate::{
|
|||
errors::BinstallError,
|
||||
helpers::{
|
||||
download::ExtractedFiles, gh_api_client::GhApiClient, remote::Client,
|
||||
tasks::AutoAbortJoinHandle,
|
||||
target_triple::TargetTriple, tasks::AutoAbortJoinHandle,
|
||||
},
|
||||
manifests::cargo_toml_binstall::{PkgFmt, PkgMeta},
|
||||
};
|
||||
|
@ -72,6 +72,8 @@ pub trait Fetcher: Send + Sync {
|
|||
|
||||
/// Return the target for this fetcher
|
||||
fn target(&self) -> &str;
|
||||
|
||||
fn target_data(&self) -> &Arc<TargetData>;
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
@ -186,6 +188,7 @@ impl RepoInfo {
|
|||
#[derive(Clone, Debug)]
|
||||
pub struct TargetData {
|
||||
pub target: String,
|
||||
pub triple: TargetTriple,
|
||||
pub meta: PkgMeta,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue