Skip to content

Commit f981fc2

Browse files
authored
when including hts-sys, don't use default features -- let the outer r… (#185)
* when including hts-sys, don't use default features -- let the outer rust-htslib crate control them * describe crate feature options
1 parent 02d72aa commit f981fc2

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ serde_base = { version = "^1", optional = true, package = "serde" }
3030
serde_bytes = { version = "0.11", optional = true }
3131
bio-types = ">=0.5.1"
3232
snafu = ">= 0.5.0, <= 0.6.0"
33-
hts-sys = { version = "^1.9", path = "hts-sys" }
33+
hts-sys = { version = "^1.9", path = "hts-sys", default-features = false }
3434

3535
[features]
3636
default = ["bzip2", "lzma"]

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,26 @@ To compile this crate you need the development headers of zlib, bzip2 and xz.
2424
## Usage
2525

2626
Add this to your `Cargo.toml`:
27-
2827
```toml
2928
[dependencies]
3029
rust-htslib = "*"
3130
```
3231

32+
By default `rust-htslib` links to `bzip2-sys` and `lzma-sys` for full CRAM support. If you do not need CRAM support, or you do need to support CRAM files
33+
with these compression methods, you can deactivate these features to reduce you dependency count:
34+
35+
```toml
36+
[dependencies]
37+
rust-htslib = { version = "*", default-features = false }
38+
```
39+
40+
`rust-htslib` also has optional support for `serde`, to allow (de)serialization of `bam::Record` via any serde-supported format:
41+
42+
```toml
43+
[dependencies]
44+
rust-htslib = { version = "*", features = ["serde"] }
45+
```
46+
3347
For more information, please see the [docs](https://docs.rs/rust-htslib).
3448

3549
# Authors

0 commit comments

Comments
 (0)