Skip to content

Commit

Permalink
Merge branch 'master' into index-fai
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester authored Feb 23, 2024
2 parents 0b71b61 + b6aeba4 commit 8559fae
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 106 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ jobs:
target:
- no-default-features
- all-features
- musl-release-no-default-features
- musl-release-all-features
- musl-all-features
include:
- target: no-default-features
args: --no-default-features
Expand All @@ -96,18 +93,6 @@ jobs:
args: --all-features
toolchain_target: x86_64-unknown-linux-musl
use_cross: false
- target: musl-release-no-default-features
args: --release --target x86_64-unknown-linux-musl --no-default-features
toolchain_target: x86_64-unknown-linux-musl
use_cross: true
- target: musl-release-all-features
args: --release --target x86_64-unknown-linux-musl --all-features --verbose
toolchain_target: x86_64-unknown-linux-musl
use_cross: true
- target: musl-all-features
args: --target x86_64-unknown-linux-musl --all-features --verbose
toolchain_target: x86_64-unknown-linux-musl
use_cross: true

steps:
- name: Checkout repository
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.46.0](https://github.com/rust-bio/rust-htslib/compare/v0.45.0...v0.46.0) (2024-02-22)


### Features

* making several RecordBuffer methods public ([6757f52](https://github.com/rust-bio/rust-htslib/commit/6757f5219955fd4edba4f61e62978ce1e001068e))


### Bug Fixes

* fix building libz-sys ([#420](https://github.com/rust-bio/rust-htslib/issues/420)) ([01c8849](https://github.com/rust-bio/rust-htslib/commit/01c884945686e7a6756406b579fde28657f70b36))

## [0.45.0](https://github.com/rust-bio/rust-htslib/compare/v0.44.1...v0.45.0) (2024-02-07)


Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ license = "MIT"
name = "rust-htslib"
readme = "README.md"
repository = "https://github.com/rust-bio/rust-htslib.git"
version = "0.45.0"
version = "0.46.0"

[package.metadata.release]
pre-release-commit-message = "release version {{version}}"
tag-message = "Version {{version}} of Rust-HTSlib."

[dependencies]
libz-sys = ">=1.1.15"
bio-types = ">=0.9"
byteorder = "1.3"
custom_derive = "0.1"
Expand Down
11 changes: 0 additions & 11 deletions Cross.toml

This file was deleted.

30 changes: 0 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,6 @@ If you only want to use the library, there is no need to clone the repository. G

rust-htslib comes with pre-built bindings to htslib for Mac and Linux. You will need a C toolchain compatible with the `cc` crate. The build script for this crate will automatically build a link htslib.


### MUSL build
To compile this for MUSL crate you need docker and cross:

```shell
$ cargo install cross
$ cross build # will build with GNU GCC or LLVM toolchains
```

If you want to run rust-htslib code on AWS lambda, [you'll need to statically compile it with MUSL](https://github.com/awslabs/aws-lambda-rust-runtime/issues/17#issuecomment-577490373) as follows:

```shell
$ cross build --target x86_64-unknown-linux-musl # will build with MUSL toolchain
```

Alternatively, you can also install it locally by installing the development headers of zlib, bzip2 and xz. For instance, in Debian systems one needs the following dependencies:

```shell
$ sudo apt-get install zlib1g-dev libbz2-dev liblzma-dev clang pkg-config
```

We provide Dockerfile bases that provide these dependencies. Refer to the [docker](https://github.com/rust-bio/rust-htslib/tree/master/docker) directory in this repository for the latest instructions, including LLVM installation.

On OSX:

```shell
$ brew install FiloSottile/musl-cross/musl-cross
$ brew install bzip2 zlib xz curl-openssl
```

## Usage

Add this to your `Cargo.toml`:
Expand Down
7 changes: 0 additions & 7 deletions docker/Dockerfile.gnu

This file was deleted.

16 changes: 0 additions & 16 deletions docker/Dockerfile.musl

This file was deleted.

17 changes: 0 additions & 17 deletions docker/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions docker/config-musl-cross-make.mak

This file was deleted.

6 changes: 3 additions & 3 deletions src/bam/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ impl RecordBuffer {
}

/// Return start position of buffer
fn start(&self) -> Option<u64> {
pub fn start(&self) -> Option<u64> {
self.inner.front().map(|rec| rec.pos() as u64)
}

/// Return end position of buffer.
fn end(&self) -> Option<u64> {
pub fn end(&self) -> Option<u64> {
self.inner.back().map(|rec| rec.pos() as u64)
}

fn tid(&self) -> Option<i32> {
pub fn tid(&self) -> Option<i32> {
self.inner.back().map(|rec| rec.tid())
}

Expand Down

0 comments on commit 8559fae

Please sign in to comment.