From d78a56559c201de8c8b05e0fd9e2f83e3f6384bb Mon Sep 17 00:00:00 2001 From: Etienne Lescot Date: Thu, 3 Sep 2026 14:05:32 +0200 Subject: [PATCH] fix(build): stop hiding the shared dependencies behind cfg(linux) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows and macOS have not compiled since #559. My fault, and a plain editing mistake rather than a design one: adding `ash` and `wgpu-hal` put the `[target.'cfg(target_os = "linux")'.dependencies]` header immediately after `anyhow`, so everything below it — `wgpu`, `pollster`, `cosmic-text`, `ort`, `ndarray`, `serde`, `serde_json`, `image` — became Linux-only. error[E0432]: unresolved import `serde` error[E0433]: cannot find module or crate `ort` in this scope The two new crates belong under that header. Nothing else does. They are back in `[dependencies]`, with the header moved below them and a note saying what it is for, since the failure mode is silent on the platform you are developing on: the Linux build never stopped working, which is why this reached main. `cargo metadata` now reports exactly `ash` and `wgpu-hal` as target-gated, and `wgpu`, `serde`, `ort`, `image`, `pollster` as shared. The Linux build still compiles. I could not verify the Windows and macOS builds locally — those targets are not installed here — so this rests on the manifest structure and on CI. --- crates/compositor/Cargo.toml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/crates/compositor/Cargo.toml b/crates/compositor/Cargo.toml index 1af738e55..face980ee 100644 --- a/crates/compositor/Cargo.toml +++ b/crates/compositor/Cargo.toml @@ -24,22 +24,28 @@ segmentation = ["dep:ort", "dep:ndarray"] [dependencies] anyhow.workspace = true -[target.'cfg(target_os = "linux")'.dependencies] -# Acces Vulkan brut, UNIQUEMENT pour ouvrir le device avec les extensions de -# memoire externe (cf. `d3d_linux::open_device_with_dmabuf_export`). Les versions -# sont celles que wgpu 24 tire deja : en prendre d'autres ferait cohabiter deux -# bindings pour un meme `VkDevice`. wgpu.workspace = true pollster.workspace = true cosmic-text.workspace = true -ash = "0.38" -wgpu-hal = { version = "24", features = ["vulkan"] } ort = { workspace = true, optional = true } ndarray = { workspace = true, optional = true } serde.workspace = true serde_json.workspace = true image.workspace = true +# Acces Vulkan brut, UNIQUEMENT pour ouvrir le device avec les extensions de +# memoire externe (cf. `d3d_linux::open_device_with_dmabuf_export`). Les versions +# sont celles que wgpu 24 tire deja : en prendre d'autres ferait cohabiter deux +# bindings pour un meme `VkDevice`. +# +# LINUX SEULEMENT, et rien d'autre ne doit venir ici : ces deux lignes ont ete +# ajoutees sous cet en-tete par une edition qui l'a place trop haut, emportant +# `wgpu`, `serde`, `ort` et le reste avec elles. Windows et macOS ont alors cesse +# de compiler. +[target.'cfg(target_os = "linux")'.dependencies] +ash = "0.38" +wgpu-hal = { version = "24", features = ["vulkan"] } + # Windows : D3D11 + D3D11VA + Direct2D/DirectWrite + HLSL à l'exécution. [target.'cfg(windows)'.dependencies] windows.workspace = true