1[package] 2name = "libz-sys" 3version = "1.1.3" 4authors = ["Alex Crichton <alex@alexcrichton.com>", "Josh Triplett <josh@joshtriplett.org>"] 5links = "z" 6build = "build.rs" 7license = "MIT OR Apache-2.0" 8repository = "https://github.com/rust-lang/libz-sys" 9documentation = "https://docs.rs/libz-sys" 10description = """ 11Low-level bindings to the system libz library (also known as zlib). 12""" 13categories = ["compression", "external-ffi-bindings"] 14keywords = ["zlib", "zlib-ng"] 15 16[workspace] 17members = ["systest"] 18 19[dependencies] 20# When this feature is disabled, zlib will be built in Z_SOLO mode which 21# removes dependency on any external libraries like libc at the cost of 22# eliminating some high-level functions like gz*, compress* and 23# uncompress, and requiring embedder to provide memory allocation 24# routines to deflate and inflate. 25libc = { version = "0.2.43", optional = true } 26 27[build-dependencies] 28pkg-config = "0.3.9" 29cc = "1.0.18" 30cmake = { version = "0.1.44", optional = true } 31 32[target.'cfg(target_env = "msvc")'.build-dependencies] 33vcpkg = "0.2" 34 35[features] 36default = ["libc", "stock-zlib"] 37# By default, libz-sys uses stock zlib. If you set default-features=false, 38# enable the zlib-ng feature, and don't enable the stock-zlib feature, libz-sys 39# will instead supply the high-performance zlib-ng, in zlib-compat mode. Any 40# application or library designed for zlib should work with zlib-ng in 41# zlib-compat mode, as long as it doesn't make assumptions about the exact size 42# or output of the deflated data (e.g. "compressing this data produces exactly 43# this many bytes"), and as long as you don't also dynamically pull in a copy 44# of stock zlib (which will produce conflicting symbols). If a single crate in 45# the dependency graph requests stock-zlib (or doesn't disable default 46# features), you'll get stock zlib. 47# 48# Library crates should use: 49# libz-sys = { version = "1.1.0", default-features = false, features = ["libc"] } 50# (Omit the libc feature if you don't require the corresponding functions.) 51# 52# This allows higher-level crates depending on your library to opt into zlib-ng 53# if desired. 54# 55# Building zlib-ng requires cmake. 56zlib-ng = ["libc", "cmake"] 57stock-zlib = [] 58# Deprecated: the assembly routines are outdated, and either reduce performance 59# or cause segfaults. 60asm = [] 61# Enable this feature if you want to have a statically linked libz 62static = [] 63