mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-08 03:36:37 +00:00
Compare commits
No commits in common. "main" and "binstalk-manifests-v0.15.28" have entirely different histories.
main
...
binstalk-m
45 changed files with 792 additions and 993 deletions
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
@ -53,7 +53,7 @@ jobs:
|
|||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@115870536a85eaf050e369291c7895748ff12aea
|
||||
uses: tj-actions/changed-files@0b975f61488402a699abcebd6a1e25924cf85218
|
||||
with:
|
||||
dir_names: true
|
||||
dir_names_exclude_current_dir: true
|
||||
|
@ -275,23 +275,7 @@ jobs:
|
|||
--mount src="$PWD/.github/scripts/test-detect-targets-musl.sh",dst=/usr/local/bin/test.sh,type=bind \
|
||||
alpine /bin/ash -c "apk update && apk add bash && test.sh x86_64-unknown-linux-musl"
|
||||
|
||||
detect-targets-ubuntu-arm-test:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: true
|
||||
- name: Build and run detect-targets tests
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
output="$(cargo run --features cli-logging --bin detect-targets)"
|
||||
[ "$output" = "$(printf 'aarch64-unknown-linux-gnu\naarch64-unknown-linux-musl')" ]
|
||||
# Set working directory here, otherwise `cargo` would download
|
||||
# and build quite a few unused dependencies.
|
||||
working-directory: crates/detect-targets
|
||||
|
||||
detect-targets-ubuntu-x86_64-test:
|
||||
detect-targets-ubuntu-test:
|
||||
needs:
|
||||
- detect-targets-build
|
||||
- changed-files
|
||||
|
@ -300,7 +284,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
- ubuntu-20.04
|
||||
- ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
|
@ -401,8 +385,7 @@ jobs:
|
|||
- release-dry-run
|
||||
- detect-targets-build
|
||||
- detect-targets-alpine-test
|
||||
- detect-targets-ubuntu-arm-test
|
||||
- detect-targets-ubuntu-x86_64-test
|
||||
- detect-targets-ubuntu-test
|
||||
- detect-targets-more-glibc-test
|
||||
- detect-targets-nix-test
|
||||
- detect-targets-android-check
|
||||
|
|
3
.github/workflows/release-packages.yml
vendored
3
.github/workflows/release-packages.yml
vendored
|
@ -59,6 +59,7 @@ jobs:
|
|||
GLIBC_VERSION: ${{ matrix.g }}
|
||||
JUST_USE_CARGO_ZIGBUILD: ${{ matrix.c }}
|
||||
JUST_FOR_RELEASE: true
|
||||
JUST_USE_AUDITABLE: true
|
||||
JUST_ENABLE_H3: true
|
||||
|
||||
steps:
|
||||
|
@ -76,7 +77,7 @@ jobs:
|
|||
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
tools: rsign2,rage
|
||||
tools: cargo-auditable,rsign2,rage
|
||||
env:
|
||||
# just-setup use binstall to install sccache,
|
||||
# which works better when we provide it with GITHUB_TOKEN.
|
||||
|
|
1228
Cargo.lock
generated
1228
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -7,9 +7,7 @@ runs:
|
|||
- name: Install cargo-binstall
|
||||
if: runner.os != 'Windows'
|
||||
shell: sh
|
||||
run: |
|
||||
set -eu
|
||||
(curl --retry 10 -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh || echo 'exit 1') | bash
|
||||
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
- name: Install cargo-binstall
|
||||
if: runner.os == 'Windows'
|
||||
run: Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "cargo-binstall"
|
|||
description = "Binary installation for rust projects"
|
||||
repository = "https://github.com/cargo-bins/cargo-binstall"
|
||||
documentation = "https://docs.rs/cargo-binstall"
|
||||
version = "1.12.7"
|
||||
version = "1.12.2"
|
||||
rust-version = "1.79.0"
|
||||
authors = ["ryan <ryan@kurte.nz>"]
|
||||
edition = "2021"
|
||||
|
@ -23,13 +23,13 @@ pkg-fmt = "zip"
|
|||
|
||||
[dependencies]
|
||||
atomic-file-install = { version = "1.0.11", path = "../atomic-file-install" }
|
||||
binstalk = { path = "../binstalk", version = "0.28.35", default-features = false }
|
||||
binstalk-manifests = { path = "../binstalk-manifests", version = "0.16.0" }
|
||||
binstalk = { path = "../binstalk", version = "0.28.31", default-features = false }
|
||||
binstalk-manifests = { path = "../binstalk-manifests", version = "0.15.28" }
|
||||
clap = { version = "4.5.3", features = ["derive", "env", "wrap_help"] }
|
||||
clap-cargo = "0.15.2"
|
||||
compact_str = "0.9.0"
|
||||
dirs = "6.0.0"
|
||||
file-format = { version = "0.27.0", default-features = false }
|
||||
file-format = { version = "0.26.0", default-features = false }
|
||||
home = "0.5.9"
|
||||
log = { version = "0.4.22", features = ["std"] }
|
||||
miette = "7.0.0"
|
||||
|
|
|
@ -11,7 +11,17 @@ fn succeeds(res: io::Result<Child>) -> bool {
|
|||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
fn emit_vergen_info() {
|
||||
fn main() {
|
||||
let handle = thread::spawn(|| {
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:rerun-if-changed=manifest.rc");
|
||||
println!("cargo:rerun-if-changed=windows.manifest");
|
||||
|
||||
embed_resource::compile("manifest.rc", embed_resource::NONE)
|
||||
.manifest_required()
|
||||
.unwrap();
|
||||
});
|
||||
|
||||
let git = Command::new("git").arg("--version").spawn();
|
||||
|
||||
// .git is usually a dir, but it also can be a file containing
|
||||
|
@ -31,22 +41,6 @@ fn emit_vergen_info() {
|
|||
}
|
||||
|
||||
builder.emit().unwrap();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
thread::scope(|s| {
|
||||
let handle = s.spawn(|| {
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:rerun-if-changed=manifest.rc");
|
||||
println!("cargo:rerun-if-changed=windows.manifest");
|
||||
|
||||
embed_resource::compile("manifest.rc", embed_resource::NONE)
|
||||
.manifest_required()
|
||||
.unwrap();
|
||||
});
|
||||
|
||||
emit_vergen_info();
|
||||
|
||||
handle.join().unwrap();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -527,7 +527,7 @@ fn do_install_fetches(
|
|||
|
||||
if no_cleanup {
|
||||
// Consume temp_dir without removing it from fs.
|
||||
let _ = temp_dir.keep();
|
||||
let _ = temp_dir.into_path();
|
||||
} else {
|
||||
temp_dir.close().unwrap_or_else(|err| {
|
||||
warn!("Failed to clean up some resources: {err}");
|
||||
|
@ -577,7 +577,7 @@ fn do_install_fetches_continue_on_failure(
|
|||
|
||||
if no_cleanup {
|
||||
// Consume temp_dir without removing it from fs.
|
||||
let _ = temp_dir.keep();
|
||||
let _ = temp_dir.into_path();
|
||||
} else {
|
||||
temp_dir.close().unwrap_or_else(|err| {
|
||||
warn!("Failed to clean up some resources: {err}");
|
||||
|
|
|
@ -27,7 +27,12 @@ pub(super) async fn get() -> io::Result<Zeroizing<Box<str>>> {
|
|||
.strip_prefix("password=")
|
||||
.map(|token| Zeroizing::new(token.into()))
|
||||
})
|
||||
.ok_or_else(|| io::Error::other("Password not found in `git credential fill` output"))
|
||||
.ok_or_else(|| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
"Password not found in `git credential fill` output",
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
trait CommandExt {
|
||||
|
@ -81,10 +86,10 @@ impl CommandExt for Command {
|
|||
} else {
|
||||
zeroize_and_drop(stdout);
|
||||
|
||||
Err(io::Error::other(format!(
|
||||
"`{:?}` process exited with `{status}`",
|
||||
self.as_std()
|
||||
)))
|
||||
Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("`{:?}` process exited with `{status}`", self.as_std()),
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Binstall.Cli.binstall"
|
||||
version="1.12.7.0"
|
||||
version="1.12.2.0"
|
||||
/>
|
||||
|
||||
<trustInfo>
|
||||
|
|
|
@ -6,12 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.6.14](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-bins-v0.6.13...binstalk-bins-v0.6.14) - 2025-06-06
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-types
|
||||
|
||||
## [0.6.13](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-bins-v0.6.12...binstalk-bins-v0.6.13) - 2025-03-19
|
||||
|
||||
### Other
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "binstalk-bins"
|
||||
version = "0.6.14"
|
||||
version = "0.6.13"
|
||||
edition = "2021"
|
||||
|
||||
description = "The binstall binaries discovery and installation crate."
|
||||
|
@ -12,7 +12,7 @@ license = "GPL-3.0-only"
|
|||
|
||||
[dependencies]
|
||||
atomic-file-install = { version = "1.0.11", path = "../atomic-file-install" }
|
||||
binstalk-types = { version = "0.10.0", path = "../binstalk-types" }
|
||||
binstalk-types = { version = "0.9.4", path = "../binstalk-types" }
|
||||
compact_str = { version = "0.9.0", features = ["serde"] }
|
||||
leon = "3.0.0"
|
||||
miette = "7.0.0"
|
||||
|
|
|
@ -6,24 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.13.20](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-downloader-v0.13.19...binstalk-downloader-v0.13.20) - 2025-06-06
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-types
|
||||
|
||||
## [0.13.19](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-downloader-v0.13.18...binstalk-downloader-v0.13.19) - 2025-05-30
|
||||
|
||||
### Other
|
||||
|
||||
- Upgrade reqwest to 0.12.17 ([#2168](https://github.com/cargo-bins/cargo-binstall/pull/2168))
|
||||
|
||||
## [0.13.18](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-downloader-v0.13.17...binstalk-downloader-v0.13.18) - 2025-05-16
|
||||
|
||||
### Other
|
||||
|
||||
- Upgrade transitive dependencies ([#2154](https://github.com/cargo-bins/cargo-binstall/pull/2154))
|
||||
|
||||
## [0.13.17](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-downloader-v0.13.16...binstalk-downloader-v0.13.17) - 2025-04-05
|
||||
|
||||
### Other
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "binstalk-downloader"
|
|||
description = "The binstall toolkit for downloading and extracting file"
|
||||
repository = "https://github.com/cargo-bins/cargo-binstall"
|
||||
documentation = "https://docs.rs/binstalk-downloader"
|
||||
version = "0.13.20"
|
||||
version = "0.13.17"
|
||||
rust-version = "1.79.0"
|
||||
authors = ["ryan <ryan@kurte.nz>"]
|
||||
edition = "2021"
|
||||
|
@ -18,7 +18,7 @@ async-compression = { version = "0.4.4", features = [
|
|||
"bzip2",
|
||||
"tokio",
|
||||
] }
|
||||
binstalk-types = { version = "0.10.0", path = "../binstalk-types" }
|
||||
binstalk-types = { version = "0.9.4", path = "../binstalk-types" }
|
||||
bytes = "1.4.0"
|
||||
bzip2 = { version = "0.5.2", default-features = false, features = [
|
||||
"libbz2-rs-sys",
|
||||
|
@ -36,7 +36,7 @@ rc-zip-sync = { version = "4.2.6", features = [
|
|||
"lzma",
|
||||
"zstd",
|
||||
] }
|
||||
reqwest = { version = "0.12.17", features = [
|
||||
reqwest = { version = "0.12.5", features = [
|
||||
"http2",
|
||||
"stream",
|
||||
"zstd",
|
||||
|
@ -136,6 +136,3 @@ ipconfig = { version = "0.3.2", optional = true, default-features = false }
|
|||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(reqwest_unstable)'] }
|
||||
|
|
|
@ -53,7 +53,7 @@ impl From<DownloadError> for io::Error {
|
|||
fn from(e: DownloadError) -> io::Error {
|
||||
match e {
|
||||
DownloadError::Io(io_error) => io_error,
|
||||
e => io::Error::other(e),
|
||||
e => io::Error::new(io::ErrorKind::Other, e),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,11 +144,6 @@ impl Client {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(all(reqwest_unstable, feature = "http3"))]
|
||||
{
|
||||
builder = builder.http3_congestion_bbr().tls_early_data(true);
|
||||
}
|
||||
|
||||
builder
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,10 @@ where
|
|||
async fn inner<T: Send + 'static>(handle: task::JoinHandle<io::Result<T>>) -> io::Result<T> {
|
||||
match handle.await {
|
||||
Ok(res) => res,
|
||||
Err(err) => Err(io::Error::other(format!("background task failed: {err}"))),
|
||||
Err(err) => Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("background task failed: {err}"),
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,24 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.10.21](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-fetchers-v0.10.20...binstalk-fetchers-v0.10.21) - 2025-06-06
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-types, binstalk-downloader, binstalk-downloader, binstalk-git-repo-api
|
||||
|
||||
## [0.10.20](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-fetchers-v0.10.19...binstalk-fetchers-v0.10.20) - 2025-05-30
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-downloader, binstalk-downloader, binstalk-git-repo-api
|
||||
|
||||
## [0.10.19](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-fetchers-v0.10.18...binstalk-fetchers-v0.10.19) - 2025-05-16
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-downloader, binstalk-downloader, binstalk-git-repo-api
|
||||
|
||||
## [0.10.18](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-fetchers-v0.10.17...binstalk-fetchers-v0.10.18) - 2025-04-05
|
||||
|
||||
### Other
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "binstalk-fetchers"
|
||||
version = "0.10.21"
|
||||
version = "0.10.18"
|
||||
edition = "2021"
|
||||
|
||||
description = "The binstall fetchers"
|
||||
|
@ -12,9 +12,9 @@ license = "GPL-3.0-only"
|
|||
|
||||
[dependencies]
|
||||
async-trait = "0.1.88"
|
||||
binstalk-downloader = { version = "0.13.20", path = "../binstalk-downloader", default-features = false }
|
||||
binstalk-git-repo-api = { version = "0.5.22", path = "../binstalk-git-repo-api" }
|
||||
binstalk-types = { version = "0.10.0", path = "../binstalk-types" }
|
||||
binstalk-downloader = { version = "0.13.17", path = "../binstalk-downloader", default-features = false }
|
||||
binstalk-git-repo-api = { version = "0.5.19", path = "../binstalk-git-repo-api" }
|
||||
binstalk-types = { version = "0.9.4", path = "../binstalk-types" }
|
||||
bytes = "1.4.0"
|
||||
compact_str = { version = "0.9.0" }
|
||||
either = "1.11.0"
|
||||
|
@ -34,7 +34,7 @@ tracing = "0.1.39"
|
|||
url = "2.5.4"
|
||||
|
||||
[dev-dependencies]
|
||||
binstalk-downloader = { version = "0.13.20", path = "../binstalk-downloader" }
|
||||
binstalk-downloader = { version = "0.13.17", path = "../binstalk-downloader" }
|
||||
|
||||
[features]
|
||||
quickinstall = []
|
||||
|
|
|
@ -6,24 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.5.22](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-git-repo-api-v0.5.21...binstalk-git-repo-api-v0.5.22) - 2025-06-06
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-downloader, binstalk-downloader
|
||||
|
||||
## [0.5.21](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-git-repo-api-v0.5.20...binstalk-git-repo-api-v0.5.21) - 2025-05-30
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-downloader, binstalk-downloader
|
||||
|
||||
## [0.5.20](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-git-repo-api-v0.5.19...binstalk-git-repo-api-v0.5.20) - 2025-05-16
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-downloader, binstalk-downloader
|
||||
|
||||
## [0.5.19](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-git-repo-api-v0.5.18...binstalk-git-repo-api-v0.5.19) - 2025-04-05
|
||||
|
||||
### Other
|
||||
|
|
|
@ -3,14 +3,14 @@ name = "binstalk-git-repo-api"
|
|||
description = "The binstall toolkit for accessing API for git repository"
|
||||
repository = "https://github.com/cargo-bins/cargo-binstall"
|
||||
documentation = "https://docs.rs/binstalk-git-repo-api"
|
||||
version = "0.5.22"
|
||||
version = "0.5.19"
|
||||
rust-version = "1.70.0"
|
||||
authors = ["Jiahao XU <Jiahao_XU@outlook.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0 OR MIT"
|
||||
|
||||
[dependencies]
|
||||
binstalk-downloader = { version = "0.13.20", path = "../binstalk-downloader", default-features = false, features = [
|
||||
binstalk-downloader = { version = "0.13.17", path = "../binstalk-downloader", default-features = false, features = [
|
||||
"json",
|
||||
] }
|
||||
compact_str = "0.9.0"
|
||||
|
@ -25,6 +25,6 @@ url = "2.5.4"
|
|||
zeroize = "1.8.1"
|
||||
|
||||
[dev-dependencies]
|
||||
binstalk-downloader = { version = "0.13.20", path = "../binstalk-downloader" }
|
||||
binstalk-downloader = { version = "0.13.17", path = "../binstalk-downloader" }
|
||||
tracing-subscriber = "0.3"
|
||||
once_cell = "1"
|
||||
|
|
|
@ -6,34 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.16.0](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-manifests-v0.15.31...binstalk-manifests-v0.16.0) - 2025-06-06
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix updating of installed crates manifest on custom sparse registry ([#2178](https://github.com/cargo-bins/cargo-binstall/pull/2178))
|
||||
|
||||
### Other
|
||||
|
||||
- Optimize CratesToml ([#2186](https://github.com/cargo-bins/cargo-binstall/pull/2186))
|
||||
|
||||
## [0.15.31](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-manifests-v0.15.30...binstalk-manifests-v0.15.31) - 2025-05-30
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: detect-targets
|
||||
|
||||
## [0.15.30](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-manifests-v0.15.29...binstalk-manifests-v0.15.30) - 2025-05-16
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: detect-targets
|
||||
|
||||
## [0.15.29](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-manifests-v0.15.28...binstalk-manifests-v0.15.29) - 2025-05-07
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: detect-targets
|
||||
|
||||
## [0.15.28](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-manifests-v0.15.27...binstalk-manifests-v0.15.28) - 2025-04-05
|
||||
|
||||
### Other
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "binstalk-manifests"
|
|||
description = "The binstall toolkit for manipulating with manifest"
|
||||
repository = "https://github.com/cargo-bins/cargo-binstall"
|
||||
documentation = "https://docs.rs/binstalk-manifests"
|
||||
version = "0.16.0"
|
||||
version = "0.15.28"
|
||||
rust-version = "1.61.0"
|
||||
authors = ["ryan <ryan@kurte.nz>"]
|
||||
edition = "2021"
|
||||
|
@ -11,7 +11,7 @@ license = "Apache-2.0 OR MIT"
|
|||
|
||||
[dependencies]
|
||||
beef = { version = "0.5.2", features = ["impl_serde"] }
|
||||
binstalk-types = { version = "0.10.0", path = "../binstalk-types" }
|
||||
binstalk-types = { version = "0.9.4", path = "../binstalk-types" }
|
||||
compact_str = { version = "0.9.0", features = ["serde"] }
|
||||
fs-lock = { version = "0.1.10", path = "../fs-lock", features = ["tracing"] }
|
||||
home = "0.5.9"
|
||||
|
@ -25,5 +25,5 @@ toml_edit = { version = "0.22.12", features = ["serde"] }
|
|||
url = { version = "2.5.4", features = ["serde"] }
|
||||
|
||||
[dev-dependencies]
|
||||
detect-targets = { version = "0.1.51", path = "../detect-targets" }
|
||||
detect-targets = { version = "0.1.47", path = "../detect-targets" }
|
||||
tempfile = "3.5.0"
|
||||
|
|
|
@ -34,10 +34,10 @@ use crate_version_source::*;
|
|||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
pub struct CratesToml<'a> {
|
||||
#[serde(with = "tuple_vec_map")]
|
||||
v1: Vec<(Box<str>, Cow<'a, [CompactString]>)>,
|
||||
v1: Vec<(String, Cow<'a, [CompactString]>)>,
|
||||
}
|
||||
|
||||
impl<'v1> CratesToml<'v1> {
|
||||
impl CratesToml<'_> {
|
||||
pub fn default_path() -> Result<PathBuf, CratesTomlParseError> {
|
||||
Ok(cargo_home()?.join(".crates.toml"))
|
||||
}
|
||||
|
@ -68,14 +68,9 @@ impl<'v1> CratesToml<'v1> {
|
|||
}
|
||||
|
||||
pub fn remove(&mut self, name: &str) {
|
||||
self.remove_all(&[name]);
|
||||
}
|
||||
|
||||
/// * `sorted_names` - must be sorted
|
||||
pub fn remove_all(&mut self, sorted_names: &[&str]) {
|
||||
self.v1.retain(|(s, _bin)| {
|
||||
s.split_once(' ')
|
||||
.map(|(crate_name, _rest)| sorted_names.binary_search(&crate_name).is_err())
|
||||
.map(|(crate_name, _rest)| crate_name != name)
|
||||
.unwrap_or_default()
|
||||
});
|
||||
}
|
||||
|
@ -111,54 +106,53 @@ impl<'v1> CratesToml<'v1> {
|
|||
self.write_to_file(&mut file)
|
||||
}
|
||||
|
||||
pub fn add_crate(&mut self, metadata: &'v1 CrateInfo) {
|
||||
pub fn append_to_file<'a, Iter>(file: &mut File, iter: Iter) -> Result<(), CratesTomlParseError>
|
||||
where
|
||||
Iter: IntoIterator<Item = &'a CrateInfo>,
|
||||
{
|
||||
fn inner(
|
||||
file: &mut File,
|
||||
iter: &mut dyn Iterator<Item = &CrateInfo>,
|
||||
) -> Result<(), CratesTomlParseError> {
|
||||
let mut c1 = CratesToml::load_from_reader(&mut *file)?;
|
||||
|
||||
for metadata in iter {
|
||||
let name = &metadata.name;
|
||||
let version = &metadata.current_version;
|
||||
let source = Source::from(&metadata.source);
|
||||
|
||||
self.v1.push((
|
||||
format!("{name} {version} ({source})").into(),
|
||||
c1.remove(name);
|
||||
c1.v1.push((
|
||||
format!("{name} {version} ({source})"),
|
||||
Cow::borrowed(&metadata.bins),
|
||||
));
|
||||
}
|
||||
|
||||
pub fn append_to_file(
|
||||
file: &mut File,
|
||||
crates: &[CrateInfo],
|
||||
) -> Result<(), CratesTomlParseError> {
|
||||
let mut c1 = CratesToml::load_from_reader(&mut *file)?;
|
||||
|
||||
c1.remove_all(&{
|
||||
let mut crate_names: Vec<_> = crates
|
||||
.iter()
|
||||
.map(|metadata| metadata.name.as_str())
|
||||
.collect();
|
||||
crate_names.sort_unstable();
|
||||
crate_names
|
||||
});
|
||||
|
||||
c1.v1.reserve_exact(crates.len());
|
||||
|
||||
for metadata in crates {
|
||||
c1.add_crate(metadata);
|
||||
}
|
||||
|
||||
file.rewind()?;
|
||||
c1.write_to_file(file)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn append_to_path(
|
||||
path: impl AsRef<Path>,
|
||||
crates: &[CrateInfo],
|
||||
) -> Result<(), CratesTomlParseError> {
|
||||
let mut file = create_if_not_exist(path.as_ref())?;
|
||||
Self::append_to_file(&mut file, crates)
|
||||
inner(file, &mut iter.into_iter())
|
||||
}
|
||||
|
||||
pub fn append(crates: &[CrateInfo]) -> Result<(), CratesTomlParseError> {
|
||||
Self::append_to_path(Self::default_path()?, crates)
|
||||
pub fn append_to_path<'a, Iter>(
|
||||
path: impl AsRef<Path>,
|
||||
iter: Iter,
|
||||
) -> Result<(), CratesTomlParseError>
|
||||
where
|
||||
Iter: IntoIterator<Item = &'a CrateInfo>,
|
||||
{
|
||||
let mut file = create_if_not_exist(path.as_ref())?;
|
||||
Self::append_to_file(&mut file, iter)
|
||||
}
|
||||
|
||||
pub fn append<'a, Iter>(iter: Iter) -> Result<(), CratesTomlParseError>
|
||||
where
|
||||
Iter: IntoIterator<Item = &'a CrateInfo>,
|
||||
{
|
||||
Self::append_to_path(Self::default_path()?, iter)
|
||||
}
|
||||
|
||||
/// Return BTreeMap with crate name as key and its corresponding version
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
use std::{
|
||||
borrow::Cow,
|
||||
fmt::{self, Write as _},
|
||||
str::FromStr,
|
||||
};
|
||||
use std::{borrow::Cow, fmt, str::FromStr};
|
||||
|
||||
use binstalk_types::maybe_owned::MaybeOwned;
|
||||
use compact_str::CompactString;
|
||||
|
@ -34,7 +30,6 @@ impl From<&CrateInfo> for CrateVersionSource {
|
|||
Git => Source::Git(url),
|
||||
Path => Source::Path(url),
|
||||
Registry => Source::Registry(url),
|
||||
Sparse => Source::Sparse(url),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +40,6 @@ pub enum Source<'a> {
|
|||
Git(MaybeOwned<'a, Url>),
|
||||
Path(MaybeOwned<'a, Url>),
|
||||
Registry(MaybeOwned<'a, Url>),
|
||||
Sparse(MaybeOwned<'a, Url>),
|
||||
}
|
||||
|
||||
impl<'a> From<&'a CrateSource> for Source<'a> {
|
||||
|
@ -58,7 +52,6 @@ impl<'a> From<&'a CrateSource> for Source<'a> {
|
|||
Git => Self::Git(url),
|
||||
Path => Self::Path(url),
|
||||
Registry => Self::Registry(url),
|
||||
Sparse => Self::Sparse(url),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,15 +125,6 @@ impl fmt::Display for Source<'_> {
|
|||
Source::Git(url) => write!(f, "git+{url}"),
|
||||
Source::Path(url) => write!(f, "path+{url}"),
|
||||
Source::Registry(url) => write!(f, "registry+{url}"),
|
||||
Source::Sparse(url) => {
|
||||
let url = url.as_str();
|
||||
write!(f, "sparse+{url}")?;
|
||||
if url.ends_with("/") {
|
||||
Ok(())
|
||||
} else {
|
||||
f.write_char('/')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,24 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.11.21](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-registry-v0.11.20...binstalk-registry-v0.11.21) - 2025-06-06
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix updating of installed crates manifest on custom sparse registry ([#2178](https://github.com/cargo-bins/cargo-binstall/pull/2178))
|
||||
|
||||
## [0.11.20](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-registry-v0.11.19...binstalk-registry-v0.11.20) - 2025-05-30
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-downloader, binstalk-downloader
|
||||
|
||||
## [0.11.19](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-registry-v0.11.18...binstalk-registry-v0.11.19) - 2025-05-16
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-downloader, binstalk-downloader
|
||||
|
||||
## [0.11.18](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-registry-v0.11.17...binstalk-registry-v0.11.18) - 2025-04-05
|
||||
|
||||
### Other
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "binstalk-registry"
|
||||
version = "0.11.21"
|
||||
version = "0.11.18"
|
||||
edition = "2021"
|
||||
rust-version = "1.65.0"
|
||||
|
||||
|
@ -13,10 +13,10 @@ license = "Apache-2.0 OR MIT"
|
|||
[dependencies]
|
||||
async-trait = "0.1.88"
|
||||
base16 = "0.2.1"
|
||||
binstalk-downloader = { version = "0.13.20", path = "../binstalk-downloader", default-features = false, features = [
|
||||
binstalk-downloader = { version = "0.13.17", path = "../binstalk-downloader", default-features = false, features = [
|
||||
"json",
|
||||
] }
|
||||
binstalk-types = { version = "0.10.0", path = "../binstalk-types" }
|
||||
binstalk-types = { version = "0.9.4", path = "../binstalk-types" }
|
||||
cargo-toml-workspace = { version = "7.0.6", path = "../cargo-toml-workspace" }
|
||||
compact_str = { version = "0.9.0", features = ["serde"] }
|
||||
leon = "3.0.0"
|
||||
|
@ -40,7 +40,7 @@ url = "2.5.4"
|
|||
[dev-dependencies]
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
|
||||
toml_edit = { version = "0.22.12", features = ["serde"] }
|
||||
binstalk-downloader = { version = "0.13.20", path = "../binstalk-downloader", default-features = false, features = [
|
||||
binstalk-downloader = { version = "0.13.17", path = "../binstalk-downloader", default-features = false, features = [
|
||||
"rustls",
|
||||
] }
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{io, path::PathBuf, sync::Arc};
|
||||
use std::{fmt::Display, io, path::PathBuf, sync::Arc};
|
||||
|
||||
use binstalk_downloader::remote::Client;
|
||||
use binstalk_types::cargo_toml_binstall::Meta;
|
||||
|
@ -73,7 +73,7 @@ impl GitRegistry {
|
|||
}))
|
||||
}
|
||||
|
||||
pub fn url(&self) -> &GitUrl {
|
||||
pub fn url(&self) -> impl Display + '_ {
|
||||
&self.0.url
|
||||
}
|
||||
|
||||
|
|
|
@ -7,11 +7,7 @@ use binstalk_downloader::{
|
|||
download::DownloadError,
|
||||
remote::{Client, Error as RemoteError},
|
||||
};
|
||||
use binstalk_types::{
|
||||
cargo_toml_binstall::Meta,
|
||||
crate_info::{CrateSource, SourceType},
|
||||
maybe_owned::MaybeOwned,
|
||||
};
|
||||
use binstalk_types::cargo_toml_binstall::Meta;
|
||||
use cargo_toml_workspace::cargo_toml::{Error as CargoTomlError, Manifest};
|
||||
use compact_str::CompactString;
|
||||
use leon::{ParseError, RenderError};
|
||||
|
@ -84,7 +80,7 @@ pub enum RegistryError {
|
|||
CargoManifest(#[from] Box<CargoTomlError>),
|
||||
|
||||
#[error("Failed to parse url: {0}")]
|
||||
UrlParse(#[from] UrlParseError),
|
||||
UrlParse(#[from] url::ParseError),
|
||||
|
||||
#[error(transparent)]
|
||||
Download(#[from] DownloadError),
|
||||
|
@ -199,38 +195,6 @@ impl Registry {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Get url of the regsitry
|
||||
pub fn url(&self) -> Result<MaybeOwned<'_, Url>, UrlParseError> {
|
||||
match self {
|
||||
#[cfg(feature = "git")]
|
||||
Registry::Git(registry) => {
|
||||
Url::parse(®istry.url().to_string()).map(MaybeOwned::Owned)
|
||||
}
|
||||
Registry::Sparse(registry) => Ok(MaybeOwned::Borrowed(registry.url())),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get crate source of this registry
|
||||
pub fn crate_source(&self) -> Result<CrateSource, UrlParseError> {
|
||||
let registry = self.url()?;
|
||||
let source_type = match self {
|
||||
#[cfg(feature = "git")]
|
||||
Registry::Git(_) => SourceType::Git,
|
||||
Registry::Sparse(_) => SourceType::Sparse,
|
||||
};
|
||||
|
||||
Ok(match (registry.as_str(), source_type) {
|
||||
("https://index.crates.io/", SourceType::Sparse)
|
||||
| ("https://github.com/rust-lang/crates.io-index", SourceType::Git) => {
|
||||
CrateSource::cratesio_registry()
|
||||
}
|
||||
_ => CrateSource {
|
||||
source_type,
|
||||
url: MaybeOwned::Owned(registry.into_owned()),
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Registry {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use std::fmt::Display;
|
||||
|
||||
use binstalk_downloader::remote::{Client, Error as RemoteError};
|
||||
use binstalk_types::cargo_toml_binstall::Meta;
|
||||
use cargo_toml_workspace::cargo_toml::Manifest;
|
||||
|
@ -28,7 +30,7 @@ impl SparseRegistry {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn url(&self) -> &Url {
|
||||
pub fn url(&self) -> impl Display + '_ {
|
||||
&self.url
|
||||
}
|
||||
|
||||
|
|
|
@ -6,12 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.10.0](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-types-v0.9.4...binstalk-types-v0.10.0) - 2025-06-06
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix updating of installed crates manifest on custom sparse registry ([#2178](https://github.com/cargo-bins/cargo-binstall/pull/2178))
|
||||
|
||||
## [0.9.4](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-types-v0.9.3...binstalk-types-v0.9.4) - 2025-03-07
|
||||
|
||||
### Other
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "binstalk-types"
|
|||
description = "The binstall toolkit that contains basic types for binstalk crates"
|
||||
repository = "https://github.com/cargo-bins/cargo-binstall"
|
||||
documentation = "https://docs.rs/binstalk-types"
|
||||
version = "0.10.0"
|
||||
version = "0.9.4"
|
||||
rust-version = "1.61.0"
|
||||
authors = ["ryan <ryan@kurte.nz>"]
|
||||
edition = "2021"
|
||||
|
|
|
@ -65,7 +65,6 @@ pub enum SourceType {
|
|||
Git,
|
||||
Path,
|
||||
Registry,
|
||||
Sparse,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
|
|
|
@ -6,30 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.28.35](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-v0.28.34...binstalk-v0.28.35) - 2025-06-06
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix updating of installed crates manifest on custom sparse registry ([#2178](https://github.com/cargo-bins/cargo-binstall/pull/2178))
|
||||
|
||||
## [0.28.34](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-v0.28.33...binstalk-v0.28.34) - 2025-05-30
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: binstalk-downloader, detect-targets, binstalk-git-repo-api, binstalk-fetchers, binstalk-registry
|
||||
|
||||
## [0.28.33](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-v0.28.32...binstalk-v0.28.33) - 2025-05-16
|
||||
|
||||
### Other
|
||||
|
||||
- Upgrade transitive dependencies ([#2154](https://github.com/cargo-bins/cargo-binstall/pull/2154))
|
||||
|
||||
## [0.28.32](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-v0.28.31...binstalk-v0.28.32) - 2025-05-07
|
||||
|
||||
### Other
|
||||
|
||||
- updated the following local packages: detect-targets
|
||||
|
||||
## [0.28.31](https://github.com/cargo-bins/cargo-binstall/compare/binstalk-v0.28.30...binstalk-v0.28.31) - 2025-04-05
|
||||
|
||||
### Other
|
||||
|
|
|
@ -3,25 +3,25 @@ name = "binstalk"
|
|||
description = "The binstall toolkit (library interface)"
|
||||
repository = "https://github.com/cargo-bins/cargo-binstall"
|
||||
documentation = "https://docs.rs/binstalk"
|
||||
version = "0.28.35"
|
||||
version = "0.28.31"
|
||||
rust-version = "1.79.0"
|
||||
authors = ["ryan <ryan@kurte.nz>"]
|
||||
edition = "2021"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
binstalk-bins = { version = "0.6.14", path = "../binstalk-bins" }
|
||||
binstalk-downloader = { version = "0.13.20", path = "../binstalk-downloader", default-features = false }
|
||||
binstalk-git-repo-api = { version = "0.5.22", path = "../binstalk-git-repo-api" }
|
||||
binstalk-fetchers = { version = "0.10.21", path = "../binstalk-fetchers", features = [
|
||||
binstalk-bins = { version = "0.6.13", path = "../binstalk-bins" }
|
||||
binstalk-downloader = { version = "0.13.17", path = "../binstalk-downloader", default-features = false }
|
||||
binstalk-git-repo-api = { version = "0.5.19", path = "../binstalk-git-repo-api" }
|
||||
binstalk-fetchers = { version = "0.10.18", path = "../binstalk-fetchers", features = [
|
||||
"quickinstall",
|
||||
] }
|
||||
binstalk-registry = { version = "0.11.21", path = "../binstalk-registry" }
|
||||
binstalk-types = { version = "0.10.0", path = "../binstalk-types" }
|
||||
binstalk-registry = { version = "0.11.18", path = "../binstalk-registry" }
|
||||
binstalk-types = { version = "0.9.4", path = "../binstalk-types" }
|
||||
cargo-toml-workspace = { version = "7.0.6", path = "../cargo-toml-workspace" }
|
||||
command-group = { version = "5.0.1", features = ["with-tokio"] }
|
||||
compact_str = { version = "0.9.0", features = ["serde"] }
|
||||
detect-targets = { version = "0.1.51", path = "../detect-targets", features = [
|
||||
detect-targets = { version = "0.1.47", path = "../detect-targets", features = [
|
||||
"tracing",
|
||||
] }
|
||||
either = "1.11.0"
|
||||
|
|
|
@ -539,7 +539,7 @@ impl From<BinstallError> for io::Error {
|
|||
fn from(e: BinstallError) -> io::Error {
|
||||
match e {
|
||||
BinstallError::Io(io_error) => io_error,
|
||||
e => io::Error::other(e),
|
||||
e => io::Error::new(io::ErrorKind::Other, e),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -496,7 +496,17 @@ impl PackageInfo {
|
|||
.fetch_crate_matched(client, &name, version_req),
|
||||
)
|
||||
.await?,
|
||||
opts.registry.crate_source()?,
|
||||
{
|
||||
let registry = format!("{}", opts.registry);
|
||||
if registry == "https://index.crates.io/" {
|
||||
CrateSource::cratesio_registry()
|
||||
} else {
|
||||
CrateSource {
|
||||
source_type: SourceType::Registry,
|
||||
url: MaybeOwned::Owned(Url::parse(®istry)?),
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
};
|
||||
|
||||
|
|
|
@ -6,30 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.51](https://github.com/cargo-bins/cargo-binstall/compare/detect-targets-v0.1.50...detect-targets-v0.1.51) - 2025-06-06
|
||||
|
||||
### Other
|
||||
|
||||
- update Cargo.lock dependencies
|
||||
|
||||
## [0.1.50](https://github.com/cargo-bins/cargo-binstall/compare/detect-targets-v0.1.49...detect-targets-v0.1.50) - 2025-05-30
|
||||
|
||||
### Other
|
||||
|
||||
- update Cargo.lock dependencies
|
||||
|
||||
## [0.1.49](https://github.com/cargo-bins/cargo-binstall/compare/detect-targets-v0.1.48...detect-targets-v0.1.49) - 2025-05-16
|
||||
|
||||
### Other
|
||||
|
||||
- update Cargo.lock dependencies
|
||||
|
||||
## [0.1.48](https://github.com/cargo-bins/cargo-binstall/compare/detect-targets-v0.1.47...detect-targets-v0.1.48) - 2025-05-07
|
||||
|
||||
### Other
|
||||
|
||||
- Fix glibc detection on ubuntu 24.02 ([#2143](https://github.com/cargo-bins/cargo-binstall/pull/2143))
|
||||
|
||||
## [0.1.47](https://github.com/cargo-bins/cargo-binstall/compare/detect-targets-v0.1.46...detect-targets-v0.1.47) - 2025-04-05
|
||||
|
||||
### Other
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "detect-targets"
|
|||
description = "Detect the target of the env at runtime"
|
||||
repository = "https://github.com/cargo-bins/cargo-binstall"
|
||||
documentation = "https://docs.rs/detect-targets"
|
||||
version = "0.1.51"
|
||||
version = "0.1.47"
|
||||
rust-version = "1.62.0"
|
||||
authors = ["Jiahao XU <Jiahao_XU@outlook.com>"]
|
||||
edition = "2021"
|
||||
|
|
|
@ -52,10 +52,6 @@ pub(super) async fn detect_targets(target: String) -> Vec<String> {
|
|||
format!("/lib64/{dirname}/{filename}"),
|
||||
format!("/usr/lib/{dirname}/{filename}"),
|
||||
format!("/usr/lib64/{dirname}/{filename}"),
|
||||
format!("/usr/lib/{dirname}/libc.so.6"),
|
||||
format!("/usr/lib64/{dirname}/libc.so.6"),
|
||||
format!("/usr/lib/{dirname}/libc.so"),
|
||||
format!("/usr/lib64/{dirname}/libc.so"),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|p| AutoAbortHandle(tokio::spawn(is_gnu_ld(p))))
|
||||
|
|
|
@ -6,18 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.0.30](https://github.com/cargo-bins/cargo-binstall/compare/detect-wasi-v1.0.29...detect-wasi-v1.0.30) - 2025-05-16
|
||||
|
||||
### Other
|
||||
|
||||
- update Cargo.lock dependencies
|
||||
|
||||
## [1.0.29](https://github.com/cargo-bins/cargo-binstall/compare/detect-wasi-v1.0.28...detect-wasi-v1.0.29) - 2025-05-07
|
||||
|
||||
### Other
|
||||
|
||||
- update Cargo.lock dependencies
|
||||
|
||||
## [1.0.28](https://github.com/cargo-bins/cargo-binstall/compare/detect-wasi-v1.0.27...detect-wasi-v1.0.28) - 2025-04-05
|
||||
|
||||
### Other
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "detect-wasi"
|
|||
description = "Detect if WASI can be run"
|
||||
repository = "https://github.com/cargo-bins/cargo-binstall"
|
||||
documentation = "https://docs.rs/detect-wasi"
|
||||
version = "1.0.30"
|
||||
version = "1.0.28"
|
||||
rust-version = "1.61.0"
|
||||
authors = ["Félix Saparelli <felix@passcod.name>"]
|
||||
edition = "2021"
|
||||
|
|
|
@ -16,22 +16,21 @@ export PATH="$CARGO_HOME/bin:$PATH"
|
|||
# --disable-strategies compile \
|
||||
# cargo-binstall
|
||||
|
||||
# temporarily disable bitbucket testing as bitbucket is down
|
||||
## Test default BitBucket pkg-url templates
|
||||
#"./$1" binstall \
|
||||
# --force \
|
||||
# --manifest-path "manifests/bitbucket-test-Cargo.toml" \
|
||||
# --no-confirm \
|
||||
# --disable-strategies compile \
|
||||
# cargo-binstall
|
||||
#
|
||||
## Test that the installed binaries can be run
|
||||
#cargo binstall --help >/dev/null
|
||||
#
|
||||
#cargo_binstall_version="$(cargo binstall -V)"
|
||||
#echo "$cargo_binstall_version"
|
||||
#
|
||||
#[ "$cargo_binstall_version" = "cargo-binstall 0.12.0" ]
|
||||
# Test default BitBucket pkg-url templates
|
||||
"./$1" binstall \
|
||||
--force \
|
||||
--manifest-path "manifests/bitbucket-test-Cargo.toml" \
|
||||
--no-confirm \
|
||||
--disable-strategies compile \
|
||||
cargo-binstall
|
||||
|
||||
# Test that the installed binaries can be run
|
||||
cargo binstall --help >/dev/null
|
||||
|
||||
cargo_binstall_version="$(cargo binstall -V)"
|
||||
echo "$cargo_binstall_version"
|
||||
|
||||
[ "$cargo_binstall_version" = "cargo-binstall 0.12.0" ]
|
||||
|
||||
# Test default Github pkg-url templates,
|
||||
# with bin-dir provided
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
set -eux
|
||||
|
||||
do_curl() {
|
||||
curl --retry 10 -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L --proto '=https' --tlsv1.2 -sSf "$@"
|
||||
}
|
||||
|
||||
# Set pipefail if it works in a subshell, disregard if unsupported
|
||||
# shellcheck disable=SC3040
|
||||
(set -o pipefail 2> /dev/null) && set -o pipefail
|
||||
|
@ -30,7 +26,7 @@ fi
|
|||
os="$(uname -s)"
|
||||
if [ "$os" = "Darwin" ]; then
|
||||
url="${base_url}universal-apple-darwin.zip"
|
||||
do_curl -O "$url"
|
||||
curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -LO --proto '=https' --tlsv1.2 -sSf "$url"
|
||||
unzip cargo-binstall-universal-apple-darwin.zip
|
||||
elif [ "$os" = "Linux" ]; then
|
||||
machine="$(uname -m)"
|
||||
|
@ -43,12 +39,12 @@ elif [ "$os" = "Linux" ]; then
|
|||
fi
|
||||
|
||||
url="${base_url}${target}.tgz"
|
||||
do_curl "$url" | tar -xvzf -
|
||||
curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L --proto '=https' --tlsv1.2 -sSf "$url" | tar -xvzf -
|
||||
elif [ "${OS-}" = "Windows_NT" ]; then
|
||||
machine="$(uname -m)"
|
||||
target="${machine}-pc-windows-msvc"
|
||||
url="${base_url}${target}.zip"
|
||||
do_curl -O "$url"
|
||||
curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -LO --proto '=https' --tlsv1.2 -sSf "$url"
|
||||
unzip "cargo-binstall-${target}.zip"
|
||||
else
|
||||
echo "Unsupported OS ${os}"
|
||||
|
|
5
justfile
5
justfile
|
@ -115,12 +115,13 @@ rust-lld := "" #if use-cargo-zigbuild != "" {
|
|||
|
||||
# ICF: link-time identical code folding
|
||||
#
|
||||
# On windows it works out of the box.
|
||||
# On windows it works out of the box and on linux it uses
|
||||
# rust-lld.
|
||||
rustc-icf := if for-release != "" {
|
||||
if target-os == "windows" {
|
||||
" -C link-arg=-Wl,--icf=safe"
|
||||
} else if target-os == "linux" {
|
||||
""
|
||||
" -C link-arg=-Wl,--icf=safe"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
cargo-zigbuild
|
||||
|
||||
###### Requirements with Version Specifiers ######
|
||||
ziglang
|
||||
ziglang < 0.11 # zig 0.11 causes link failure in our CI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue