Unified Agent + reusable Go agent core.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: clarify desktop backend cgo policy

Lyric 8d709c11 db925972

+14 -1
+14 -1
desktop/wails/README.md
··· 27 27 ```bash 28 28 pnpm --dir web/console build 29 29 ./scripts/stage-console-assets.sh 30 - go build -o ./bin/mistermorph ./cmd/mistermorph 30 + CGO_ENABLED=0 go build -o ./bin/mistermorph ./cmd/mistermorph 31 31 ``` 32 + 33 + The bundled `mistermorph` backend should stay `CGO_ENABLED=0`. 34 + The desktop shell itself can still use cgo through Wails/WebKit, but the child backend is more stable as a pure-Go binary, especially inside AppImage where inherited loader state can otherwise trigger early native crashes. 35 + 36 + If a future Go dependency requires cgo, do not immediately let that leak into the bundled backend binary. 37 + Handle it in this order: 38 + 39 + 1. Keep `./cmd/mistermorph` pure-Go if possible, and isolate the cgo dependency behind build tags, an optional package, or a separate code path that the desktop backend does not import. 40 + 2. If the feature truly needs native code, prefer a separate helper binary or a desktop-only component over making the main backend child process depend on cgo. 41 + 3. Only let the bundled backend require cgo if there is no practical isolation strategy left. In that case, update the desktop packaging docs and CI together, and re-verify AppImage/DMG/Windows bundle startup before merging. 42 + 43 + The working rule is: the desktop shell may depend on cgo; the bundled `mistermorph console serve` backend should remain `CGO_ENABLED=0` unless there is a deliberate packaging plan for changing that constraint. 32 44 33 45 Run desktop app from source: 34 46 ··· 74 86 - Windows: `mistermorph-desktop-windows-amd64.zip` 75 87 76 88 The macOS DMG and Linux AppImage bundle a sibling `mistermorph` backend binary so the packaged app can launch `console serve` without a first-run download. 89 + That bundled backend is built with `CGO_ENABLED=0` on purpose; keep it that way unless the CLI/backend grows an unavoidable native dependency. 77 90 The Windows release bundle now includes both `MisterMorph.exe` and `mistermorph.exe`; keep them in the same directory after unzip. 78 91 The Windows release workflow also generates a `.ico` and Windows `.syso` resource on the runner so the published desktop executable carries the app icon. 79 92