Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix building libz-sys #420

Merged
merged 7 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ 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.

Loading