view Cargo.toml @ 190:995aca290452

Restructure the way libpam-sys-impls works to fix cross-compilation. The previous structure of libpam-sys-impls meant that things got confusing (including for me) between what constants were build-time and what constants were run-time. This broke cross-compilation. This simplifies the way that works so that `libpam-sys-impls` has *no* build script itself and is intended mostly as a library to be included in other libraries' build scripts (while also exporting the PamImpl enum).
author Paul Fisher <paul@pfish.zone>
date Sat, 02 Aug 2025 18:47:46 -0400
parents 18e865d366ba
children e915c54097d6
line wrap: on
line source

[workspace]
members = ["testharness"]
exclude = ["libpam-sys"]

[workspace.package]
license = "MIT"
version = "0.1.0"
authors = ["Paul Fisher <paul@pfish.zone>"]
edition = "2021"
rust-version = "1.75.0"

[package]
name = "nonstick"
description = "PAM bindings for Rust"
readme = "README.md"
keywords = ["pam", "ffi", "linux", "authentication"]
license.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true

[package.metadata.docs.rs]
default-target = "x86_64-unknown-linux-gnu"

targets = [
    "x86_64-apple-darwin",
    "x86_64-unknown-freebsd",
    "x86_64-unknown-illumos",
]

[features]
default = ["link"]

# Enable this to actually link against your system's PAM library.
#
# This will fail if you have extensions enabled that are not compatible
# with your system's PAM.
link = ["dep:libc", "dep:libpam-sys", "dep:libpam-sys-helpers"]

# Extensions to PAM that are shared by Linux-PAM and OpenPAM
# (i.e., most PAM installations).
basic-ext = []
# Extensions to PAM that are supported by Linux-PAM.
linux-pam-ext = []
# Extensions to PAM that are supported by OpenPAM.
openpam-ext = []
# Extensions to PAM that are supported by Sun's PAM.
sun-ext = []

[dependencies]
bitflags = "2.9.0"
libc = { optional = true, version = "0.2" }
libpam-sys = { optional = true, version = "0.1.0", path = "libpam-sys" }
libpam-sys-helpers = { optional = true, version = "0.1.0", path = "libpam-sys/libpam-sys-helpers" }
libpam-sys-impls = { version = "0.1.0", path = "libpam-sys/libpam-sys-impls" }

[build-dependencies]
libpam-sys-impls = { version = "0.1.0", path = "libpam-sys/libpam-sys-impls" }