diff Cargo.toml @ 136:efbc235f01d3

Separate libpam-sys-helpers from libpam-sys. This separates the parts of libpam-sys that don't need linking against libpam from the parts that do need to link against libpam.
author Paul Fisher <paul@pfish.zone>
date Thu, 03 Jul 2025 14:28:04 -0400
parents b52594841480
children
line wrap: on
line diff
--- a/Cargo.toml	Thu Jul 03 11:14:49 2025 -0400
+++ b/Cargo.toml	Thu Jul 03 14:28:04 2025 -0400
@@ -1,13 +1,24 @@
+[workspace]
+members = ["testharness"]
+exclude = ["libpam-sys"]
+
+[workspace.package]
+license = "MIT"
+version = "0.0.8-alpha0"
+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 = "MIT"
-version = "0.0.8-alpha0"
-authors = ["Paul Fisher <paul@pfish.zone>"]
-edition = "2021"
-rust-version = "1.75.0"
+license.workspace = true
+version.workspace = true
+authors.workspace = true
+edition.workspace = true
+rust-version.workspace = true
 
 [features]
 default = ["link", "basic-ext"]
@@ -16,7 +27,7 @@
 #
 # This will fail if you have extensions enabled that are not compatible
 # with your system's PAM.
-link = []
+link = ["libpam-sys"]
 
 basic-ext = []
 linux-pam-ext = []
@@ -31,7 +42,8 @@
 libc = "0.2"
 memoffset = "0.9.1"
 num_enum = "0.7.3"
-libpam-sys = { path = "libpam-sys" }
+libpam-sys = { optional = true, path = "libpam-sys" }
+libpam-sys-helpers = { path = "libpam-sys/libpam-sys-helpers" }
 
 [build-dependencies]
-libpam-sys = { path = "libpam-sys" }
+libpam-sys-helpers = { path = "libpam-sys/libpam-sys-helpers" }