Skip to content

Commit 858f797

Browse files
committed
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.
1 parent cc5f939 commit 858f797

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,22 @@ flate2 = "1"
4646
directories = "5"
4747
futures-util = { version = "0.3", default-features = false, features = ["std"] }
4848

49-
# libc is only referenced for the RLIMIT_NOFILE bump on Unix (issue #8 —
50-
# OpenWRT routers ship a very low fd limit that gets hit quickly under normal
51-
# traffic). Already pulled in transitively via tokio, so zero new weight.
52-
[target.'cfg(unix)'.dependencies]
53-
libc = "0.2"
54-
5549
# Optional UI dep: only pulled in when --features ui is set.
5650
eframe = { version = "0.28", default-features = false, features = [
5751
"default_fonts",
5852
"glow",
5953
"persistence",
6054
], optional = true }
6155

56+
# Unix-only deps. Must come after `[dependencies]` because starting a new
57+
# table here otherwise ends the main one — anything below it (incl. eframe)
58+
# would end up scoped to cfg(unix) and disappear on Windows builds.
59+
# libc is referenced for the RLIMIT_NOFILE bump (issue #8 — OpenWRT routers
60+
# ship a very low fd limit that fills up fast under browser load). Already
61+
# pulled in transitively via tokio, so zero new weight.
62+
[target.'cfg(unix)'.dependencies]
63+
libc = "0.2"
64+
6265
[profile.release]
6366
panic = "abort"
6467
codegen-units = 1

0 commit comments

Comments
 (0)