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").
This commit is contained in:
Josh Gratton committed 2026-06-16 14:22:08 -04:00
1 parent 59ee5c177f
commit 6fbe6aa624
1 file changed
+7
+7
View File
@@ -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 = {