Skip to content

Upgrade to Bun 1.3.2 / OpenCode 1.18.16 with self-contained Termux packaging - #24

Open
baiyun1123 wants to merge 1 commit into
guysoft:mainfrom
baiyun1123:feat/upgrade-bun-1.3.2-opencode-1.18.16
Open

Upgrade to Bun 1.3.2 / OpenCode 1.18.16 with self-contained Termux packaging#24
baiyun1123 wants to merge 1 commit into
guysoft:mainfrom
baiyun1123:feat/upgrade-bun-1.3.2-opencode-1.18.16

Conversation

@baiyun1123

Copy link
Copy Markdown

This PR upgrades the toolchain and adds self-contained Termux packaging for OpenCode on Android.

Key changes:

  • Bun 1.2.13 → 1.3.2 (host+target match exactly, eliminating module graph format incompatibility)
  • OpenCode 1.3.13 → 1.18.16 (latest tested release)
  • OpenTUI external Android assets — materialized to real filesystem via OTUI_ASSET_ROOT
  • Termux launcher (scripts/opencode-wrapper.sh) — TMPDIR, LD_PRELOAD, LD_LIBRARY_PATH, proot /tmp mapping
  • Heap tagging fix (src/libtagfix.c) — disables Android 11+ memory tagging for JSC compatibility
  • PTY library (librust_pty_arm64.so) now packaged
  • --yolo flag unhidden in --help for Termux
  • Version-isolated build dirs/patch filenames — keyed by Bun/WebKit version
  • Zig NDK libc config (configs/zig-android-libc.conf.in) for libopentui.so
  • Self-contained packages — validates all runtime files, builds libtagfix.so, packages opentui-assets, adds proot+ripgrep deps
  • Build hardening — regenerate CMake source lists, idempotent Zig cache, fallback host-Bun PATH detection

…mux packaging

Major upgrades:
- Bun target+host both pinned to 1.3.2 (module graph format now matches
  exactly, removing the old 36-byte vs 52-byte stride workaround)
- OpenCode 1.3.13 -> 1.18.16 (latest tested release)
- WebKit commit updated to match Bun 1.3.2's dependency
- OpenTUI version pinned to 0.4.5

New features:
- OpenTUI external Android assets: parser.worker.js, tree-sitter.wasm and
  native libopentui.so are materialized to the real filesystem (OTUI_ASSET_ROOT)
  instead of relying on Bun's bundled file imports, which do not return a
  usable default value on Android
- Termux launcher (scripts/opencode-wrapper.sh): sets up TMPDIR, LD_PRELOAD
  (libtagfix), LD_LIBRARY_PATH, OPENTUI_LIB_PATH, OTUI_ASSET_ROOT, and runs
  under proot when available for /tmp mapping
- Heap tagging fix (src/libtagfix.c): disables Android 11+ memory tagging
  (M_BIONIC_SET_HEAP_TAGGING_LEVEL) which conflicts with JSC NaN-boxed pointers
- PTY native library (librust_pty_arm64.so) now packaged
- --yolo flag unhidden in --help for Termux (patches/opencode/termux-yolo.patch)

Packaging / build:
- Version-isolated build dirs and patch filenames keyed by Bun/WebKit version
- Zig NDK libc config (configs/zig-android-libc.conf.in) instead of direct
  libc.so stub linking for libopentui.so
- Self-contained packages: build libtagfix.so, package opentui-assets, add
  proot + ripgrep dependencies
- WebKit linker adds -llog for Android logging
- Build hardening: regenerate Bun CMake source lists, idempotent Zig cache,
  fallback host-Bun PATH detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant