Depend on the NSIS plugin crates only where they are used

nsis-plugin-api compiles to nothing outside 32 bit Windows, but pulled
its dependencies in on all of Windows. Cargo warns that they are unused
when building for any other Windows target.
This commit is contained in:
Linus committed 2026-09-22 09:17:49 +02:00
1 parent 60f3a60c2a
commit 17a8439bff
1 file changed
+2 -1
+2 -1
View File
@@ -26,7 +26,8 @@ autobenches = false
name = "nsis_plugin_api" name = "nsis_plugin_api"
path = "src/lib.rs" path = "src/lib.rs"
[target."cfg(windows)".dependencies] # Same condition the crate itself is compiled under.
[target.'cfg(all(target_arch = "x86", target_os = "windows"))'.dependencies]
nsis-fn = { path = "../nsis-fn" } nsis-fn = { path = "../nsis-fn" }
windows-sys = { workspace = true, features = [ windows-sys = { workspace = true, features = [
"Win32_Foundation", "Win32_Foundation",