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