From 2da117e5ed9aa75ee342635b7822964a835c183d Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:13:51 +0100 Subject: [PATCH 1/2] Don't enable the stdio feature for the rust implementation of bzip2 This improves portability and for the C version we are already using BZ_NO_STDIO anyway. --- Cargo.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a4c75231..0ae4af75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,13 @@ rust-version = "1.65.0" # MSRV [dependencies] libc = "0.2" bzip2-sys = { version = "0.1.11", path = "bzip2-sys", optional = true } -libbz2-rs-sys = { version = "0.1.0", optional = true } + +[dependencies.libbz2-rs-sys] +version = "0.1.0" +# Don't enable the stdio feature for better portability. +default-features = false +features = ["rust-allocator"] +optional = true [dev-dependencies] rand = "0.8" From 9221572445e384f763d0da2addd5ad4ebe7efecc Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:19:40 +0100 Subject: [PATCH 2/2] Add CI for using the rust implementation of bzip2 --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9180047..09fd1f4e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,6 +51,8 @@ jobs: shell: bash if: matrix.build == 'msrv' - run: cargo test + - run: cargo test --no-default-features --features libbz2-rs-sys + if: matrix.build != 'msrv' rustfmt: name: Rustfmt