Repository navigation
feat(terminal): support Android arm64 remote sessions - #2139
Conversation
|
Not merged yet: this needs a decision from the maintainer, not just review. The PR copies about 7,000 lines of Smaller issues to fix whichever way that goes:
The rest of the glue looks right to me: the library is packaged beside |
|
Upstream PR for the Cgo-free Android loader: ebitengine/purego#572 It applies only the Android changes on top of purego's current main: without Cgo, Android uses the regular One problem that PR fixes, which the vendored copy here still has: Plan: keep this PR open, and once a purego release includes #572, switch |
1d85434 to
cdfb6c6
Compare
Removing the duplicate Android library helpers dropped the arm64 guard, so packaging an x86_64 APK listed the app for android/amd64 with CGO_ENABLED=0 and failed with "requires external (cgo) linking". Only arm64 has a prebuild, so other ABIs return no library before go list runs.
cdfb6c6 to
1dd9c9f
Compare
|
Audit note: this PR is authored by |
|
I rechecked this against issue #1452 acceptance. |
Summary
Android arm64 apps can now run
base/terminalremote sessions. The change builds and packages Ghostty'slibghostty-vt.soforaarch64-linux-android, adds a cgo-free bionic loader and callback bridge, and lets the Android runtime find the library besidelibnsgo.so.tools/libghosttyreuses an installed NDK or downloads and verifies the pinned NDK r28c archive. The Android.sois committed with the other Ghostty builds, and APK/App Bundle packaging adds it under the selected ABI. The Android purego subset is kept under NSGo's own internal import path so downstream apps do not need a module replacement. Unsupported Android x86_64 slices skip Ghostty packaging instead of breaking universal builds.Verification
go tool nsgo check -target all -jobs 2go tool nsgo test ./tools/libghosttygo tool nsgo test ./base/terminalgo tool nsgo test ./internal/moduletest: Android layering cases pass; the pre-existingTestFuncFieldsBindTheirValuecheck still reports fivecore.Selection*text props unrelated to this PRgithub.com/nsgo-dev/nsgo/base/terminalwithout a purego replace:go tool nsgo build -target android_arm64lib/arm64-v8a/libnsgo.soandlib/arm64-v8a/libghostty-vt.sodev.example.termapp/dev.oneo.nsgo.NsgoActivity, and verified the rendered terminal textNSGo Android terminal OKon-device"\\x1b[2;1R"; the process stayed alive with no linker, panic, or fatal runtime errors