[package]
name = "rustls-ffi"
version = "0.14.0"
license = "Apache-2.0 OR ISC OR MIT"
readme = "README-crates.io.md"
description = "Rustls bindings for non-Rust languages"
homepage = "https://github.com/rustls/rustls-ffi"
repository = "https://github.com/rustls/rustls-ffi"
categories = ["network-programming", "cryptography"]
edition = "2021"
links = "rustls_ffi"
rust-version = "1.64"

[features]
default = ["aws-lc-rs"]
# Enable this feature when building as Rust dependency. It inhibits the
# default behavior of capturing the global logger, which only works when
# built using the Makefile, which passes -C metadata=rustls-ffi to avoid
# interfering with copies of the global logger brought in by other Rust
# libraries.
no_log_capture = []
read_buf = ["rustls/read_buf"]
capi = []
ring = ["rustls/ring", "webpki/ring"]
aws-lc-rs = ["rustls/aws-lc-rs", "webpki/aws_lc_rs"]

[dependencies]
# Keep in sync with RUSTLS_CRATE_VERSION in build.rs
rustls = { version = "0.23.13", default-features = false, features = ["std", "tls12"] }
pki-types = { package = "rustls-pki-types", version = "1", features = ["std"] }
webpki = { package = "rustls-webpki", version = "0.102.0", default-features = false, features = ["std"] }
libc = "0.2"
rustls-pemfile = "2"
log = "0.4.22"
rustls-platform-verifier = "0.3"

[lib]
name = "rustls_ffi"
crate-type = ["lib", "staticlib"]

[dev-dependencies]
regex = "1.9.6"
toml = { version = "0.6.0", default-features = false, features = ["parse"] }

[package.metadata.capi.header]
name = "rustls"
subdirectory = false
generation = false # Prefer a vendored .h

[package.metadata.capi.library]
name = "rustls"
version_suffix_components = 3
rustflags = "-Cmetadata=rustls-ffi"

[package.metadata.capi.pkg_config]
name = "rustls"
filename = "rustls"

[package.metadata.capi.install.include]
asset = [{ from = "src/rustls.h", to = "" }]
