From 778a0ebb29ae7e666c91dd1b2af1b9da699f21cb Mon Sep 17 00:00:00 2001 From: Luiz Irber Date: Mon, 11 Oct 2021 16:47:41 -0700 Subject: [PATCH] Expose rust-htslib features (#33) Disable networking in rust-htslib dependency, in order to avoid needing to build openssl-sys since instructions point to local files, not remote paths. Also accounts for rust-htslib lzma feature needing bzip2 to be activated too. --- Cargo.lock | 10 ++++++++++ Cargo.toml | 9 ++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index c09d9af..e3383ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -333,6 +333,7 @@ dependencies = [ "curl-sys", "fs-utils", "glob", + "libdeflate-sys", "libz-sys", "lzma-sys", "openssl-sys", @@ -391,6 +392,15 @@ version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" +[[package]] +name = "libdeflate-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e39efa87b84db3e13ff4e2dfac1e57220abcbd7fe8ec44d238f7f4f787cc1f" +dependencies = [ + "cc", +] + [[package]] name = "libz-sys" version = "1.1.3" diff --git a/Cargo.toml b/Cargo.toml index 224c33f..4a28924 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,9 +9,16 @@ edition = "2018" include = ["src/**/*", "LICENSE", "README.md"] resolver = "2" +[features] +default = ["bzip2", "lzma", "libdeflate"] +bzip2 = ["rust-htslib/bzip2"] +lzma = ["rust-htslib/lzma", "bzip2"] +libdeflate = ["rust-htslib/libdeflate"] +curl = ["rust-htslib/curl"] + [dependencies] docopt = "*" -rust-htslib = "0.38" +rust-htslib = { version = "0.38", default-features = false } flate2 = { version = "1.0", features = ["zlib"], default-features = false } shardio = "0.8.1" bincode = "1"