diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6ac254080..df43edc40 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 8520507d2..c965e9379 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/Cross.toml b/Cross.toml deleted file mode 100644 index c6bb51e09..000000000 --- a/Cross.toml +++ /dev/null @@ -1,11 +0,0 @@ -[build.env] -passthrough = [ - "RUST_DEBUG", - "RUST_BACKTRACE", - "CFLAGS" -] - -[target.x86_64-unknown-linux-musl] -image = "brainstorm/cross-x86_64-unknown-linux-musl:1.0.4" -[target.x86_64-unknown-linux-gnu] -image = "brainstorm/cross-x86_64-unknown-linux-gnu:1.0.4" diff --git a/README.md b/README.md index 3a5343405..0662a4cc8 100644 --- a/README.md +++ b/README.md @@ -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`: diff --git a/docker/Dockerfile.gnu b/docker/Dockerfile.gnu deleted file mode 100644 index 6c2078bf2..000000000 --- a/docker/Dockerfile.gnu +++ /dev/null @@ -1,7 +0,0 @@ -FROM rustembedded/cross:x86_64-unknown-linux-gnu - -ENV LIBCLANG_PATH /usr/lib/llvm-10/lib -ENV LLVM_CONFIG_PATH /usr/bin -RUN apt-get update -RUN apt-get install -y build-essential wget gnupg lsb-release software-properties-common apt-transport-https ca-certificates # Otherwise LLVM bump below fails -RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" diff --git a/docker/Dockerfile.musl b/docker/Dockerfile.musl deleted file mode 100644 index 4988ab7e4..000000000 --- a/docker/Dockerfile.musl +++ /dev/null @@ -1,16 +0,0 @@ -FROM brainstorm/cross-x86_64-unknown-linux-musl:upstream - -ENV DEBIAN_FRONTEND noninteractive -ENV PKG_CONFIG_ALLOW_CROSS 1 - -ENV LIBCLANG_PATH /usr/lib/llvm-10/lib -ENV LLVM_CONFIG_PATH /usr/bin - -WORKDIR /root - -# Otherwise LLVM bump below fails -RUN apt-get install -y wget gnupg lsb-release software-properties-common apt-transport-https ca-certificates - -# Autodetect and fetch latest LLVM repos for the current distro, avoids LLVM warnings and other issues, might generate slower builds for now though, see: -# https://www.phoronix.com/scan.php?page=news_item&px=Rust-Hurt-On-LLVM-10 -RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 8ce0ee1cd..000000000 --- a/docker/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# cross rustembedded containers - -Allows to compile (rust-)htslib in a variety of environments and architectures via [rustembedded cross](https://github.com/rust-embedded/cross). - -## Quickstart - -```shell -$ cd docker -$ docker build -t brainstorm/cross-x86_64-unknown-linux-musl:1.0.0 . -f Dockerfile.musl -$ docker build -t brainstorm/cross-x86_64-unknown-linux-gnu:1.0.0 . -f Dockerfile.gnu -``` - -Then, to build and test rust-htslib with the above containers, proceed as you would with `cargo`, using `cross` instead, i.e: - -```shell -$ cross build --target x86_64-unknown-linux-musl -``` diff --git a/docker/config-musl-cross-make.mak b/docker/config-musl-cross-make.mak deleted file mode 100644 index 424678462..000000000 --- a/docker/config-musl-cross-make.mak +++ /dev/null @@ -1,6 +0,0 @@ -TARGET = x86_64-linux-musl -OUTPUT = /usr/local/musl -GCC_VER = 9.2.0 -BINUTILS_VER = 2.33.1 -MUSL_VER=1.2.0 -