ci fix: move [target.'cfg(unix)'.dependencies] after main [dependencies]

Placing a new table header before eframe silently scoped it into the
unix-only target table, so Windows builds lost the dependency entirely:

  error[E0432]: unresolved import `eframe`
  use of unresolved module or unlinked crate `eframe`

(Builds green on Mac/Linux because those hit cfg(unix) == true. Windows
was the only casualty.)

Moved the [target.'cfg(unix)'.dependencies] block to the end of
Cargo.toml, after the optional eframe line, so the main [dependencies]
table stays intact for all targets. Added a comment so this foot-gun
can't return.
This commit is contained in:
therealaleph
2026-04-22 14:08:16 +03:00
parent 5101a06a5d
commit 501c03a873
+9 -6
View File
@@ -46,12 +46,6 @@ flate2 = "1"
directories = "5"
futures-util = { version = "0.3", default-features = false, features = ["std"] }
# libc is only referenced for the RLIMIT_NOFILE bump on Unix (issue #8 —
# OpenWRT routers ship a very low fd limit that gets hit quickly under normal
# traffic). Already pulled in transitively via tokio, so zero new weight.
[target.'cfg(unix)'.dependencies]
libc = "0.2"
# Optional UI dep: only pulled in when --features ui is set.
eframe = { version = "0.28", default-features = false, features = [
"default_fonts",
@@ -59,6 +53,15 @@ eframe = { version = "0.28", default-features = false, features = [
"persistence",
], optional = true }
# Unix-only deps. Must come after `[dependencies]` because starting a new
# table here otherwise ends the main one — anything below it (incl. eframe)
# would end up scoped to cfg(unix) and disappear on Windows builds.
# libc is referenced for the RLIMIT_NOFILE bump (issue #8 — OpenWRT routers
# ship a very low fd limit that fills up fast under browser load). Already
# pulled in transitively via tokio, so zero new weight.
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[profile.release]
panic = "abort"
codegen-units = 1