diff --git a/crates/owlry/Cargo.toml b/crates/owlry/Cargo.toml index c98ff8f..24546bc 100644 --- a/crates/owlry/Cargo.toml +++ b/crates/owlry/Cargo.toml @@ -65,19 +65,23 @@ futures-channel = "0.3" # Lua 5.4 runtime for user configuration (Phase 3 — opt-in preview in 2.1). # Vendored C source so AUR clean-chroot builds don't depend on a system Lua. -# IMPORTANT: features live on the `lua` cargo feature row below, NOT inline -# here. Inline `features = [...]` on an `optional = true` dep get dropped -# by cargo's feature resolver in clean chroots (e.g. `cargo build --frozen` -# under makepkg), producing a build that tries to link against a non-vendored -# system liblua. Same gotcha we hit with rusqlite during the v2 migration. -mlua = { version = "0.11", optional = true } +# +# NOT optional. Initial designs gated mlua/glob/notify behind `optional = true` +# so non-lua builds wouldn't pay for them, but cargo's feature resolver in +# clean chroots (`cargo build --frozen` under makepkg) silently fails to +# propagate `mlua/vendored` across the optional boundary — the build script +# ends up emitting `-llua5.4` against a non-existent system liblua. Inlining +# the features on a *non-optional* dep dodges that footgun entirely. The cost +# is a few MB of extra compile time for minimal builds; the `lua` cargo +# feature still gates whether the `lua` module is compiled at all. +mlua = { version = "0.11", features = ["lua54", "vendored", "send", "serialize"] } # Glob pattern support for `owlry.util.glob` (Phase 3.6). Pure-Rust; small. -glob = { version = "0.3", optional = true } +glob = "0.3" # Filesystem watching for owlry.lua hot reload (Phase 3.7). On Linux the # inotify backend is unconditional, so default features are fine. -notify = { version = "6", optional = true } +notify = "6" [build-dependencies] # GResource compilation for bundled icons @@ -102,18 +106,10 @@ systemd = [] websearch = [] # Lua config layer (Phase 3 — opt-in preview in 2.1, default in 2.2, mandatory in 3.0). -# Pulls in mlua's vendored Lua 5.4 runtime, glob for owlry.util.glob, and -# notify for owlry.lua hot reload. mlua features are listed here (not inline -# on the dep above) so cargo's feature resolver keeps them in clean chroots. -lua = [ - "dep:mlua", - "mlua/lua54", - "mlua/vendored", - "mlua/send", - "mlua/serialize", - "dep:glob", - "dep:notify", -] +# Pure marker feature: gates the `lua` module compilation via cfg. Deps +# (mlua / glob / notify) are unconditionally pulled in to dodge the chroot +# feature-propagation footgun documented on the mlua line above. +lua = [] # Bookmarks deferred for 2.0 alongside the widget providers (D20+). # Returns in a later 2.x release with a pure-Rust path that doesn't pull