From 6fbe6aa6243c072cb2c5a990510e5b59ed472f21 Mon Sep 17 00:00:00 2001 From: Josh Gratton Date: Tue, 16 Jun 2026 14:22:08 -0400 Subject: [PATCH] desktop build: also stage the Linux fff binary for the WSL backend Same class as the ffi-rs fix. The WSL (Linux x64) backend loads fff's native binary (through ffi-rs / fff-node), but resolveFffNativeDependencies only promotes the host platform's fff binary (win32) to a direct staged dep, so @ff-labs/fff-bin-linux-x64-gnu never shipped in the artifact. The backend connects fine because fff loads lazily, but file-finding in WSL would fail to load the missing binary. For Windows builds, also promote the Linux x64 fff binaries (gnu + musl) alongside the host's, reusing resolveFffNativeDependencies("linux", "x64"). --- scripts/build-desktop-artifact.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts index 0ee3e7fd58..42b3050fc7 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts @@ -1077,6 +1077,13 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( options.arch, serverPackageJson.dependencies["@ff-labs/fff-node"], ), + // Windows artifacts also bundle the WSL (Linux x64) backend, which loads the + // fff native binary through ffi-rs. The platform fff binary above is the + // host's (win32), so promote the Linux x64 fff binaries too; without them + // file-finding in WSL fails to load @ff-labs/fff-bin-linux-x64-gnu. + ...(options.platform === "win" + ? resolveFffNativeDependencies("linux", "x64", serverPackageJson.dependencies["@ff-labs/fff-node"]) + : {}), }; const stagePnpmConfig = createStagePnpmConfig(workspacePatchedDependencies, stageDependencies); const stagePackageJson: StagePackageJson = {