Compare commits

...

1 Commits

Author SHA1 Message Date
Adam
b5ebec82c4 fix(app): windows server spawning error 2026-02-12 13:44:38 -06:00
3 changed files with 21 additions and 6 deletions

View File

@@ -5,9 +5,16 @@ import { copyBinaryToSidecarFolder, getCurrentSidecar, windowsify } from "./util
const RUST_TARGET = Bun.env.TAURI_ENV_TARGET_TRIPLE
const sidecarConfig = getCurrentSidecar(RUST_TARGET)
const baseline = sidecarConfig.ocBinary.endsWith("-baseline")
const binaryPath = windowsify(`../opencode/dist/${sidecarConfig.ocBinary}/bin/opencode`)
await $`cd ../opencode && bun run build --single`
if (baseline) {
await $`cd ../opencode && bun run build --single --baseline`
}
if (!baseline) {
await $`cd ../opencode && bun run build --single`
}
await copyBinaryToSidecarFolder(binaryPath, RUST_TARGET)

View File

@@ -13,7 +13,7 @@ export const SIDECAR_BINARIES: Array<{ rustTarget: string; ocBinary: string; ass
},
{
rustTarget: "x86_64-pc-windows-msvc",
ocBinary: "opencode-windows-x64",
ocBinary: "opencode-windows-x64-baseline",
assetExt: "zip",
},
{

View File

@@ -126,10 +126,18 @@ pub fn spawn_local_server(
let terminated = async {
match exit.await {
Ok(payload) => Err(format!(
"Sidecar terminated before becoming healthy (code={:?} signal={:?})",
payload.code, payload.signal
)),
Ok(payload) => {
let hint = if payload.code == Some(-1073741795) {
" (illegal instruction; binary may require unsupported CPU features)"
} else {
""
};
Err(format!(
"Sidecar terminated before becoming healthy (code={:?} signal={:?}){}",
payload.code, payload.signal, hint
))
}
Err(_) => Err("Sidecar terminated before becoming healthy".to_string()),
}
};