Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bun Android FFI

Unofficial experimental Bun Android ARM64 runtime for Termux.

This repository is intentionally tiny. It does not mirror the full Bun source tree. It hosts release artifacts, license/attribution notes, and the small downstream patch used to build a Bun runtime where bun:ffi dlopen() works on Android.

The main intended consumer is the native Cline Termux port, which uses OpenTUI and needs to load libopentui.so through bun:ffi.

Current Release

Release:

https://github.com/IChouChiang/bun-android-ffi/releases/tag/v1.4.0-canary.1-55f6c899f

Asset:

bun-android-ffi-aarch64-v1.4.0-canary.1-55f6c899f.tar.gz

For Cline Termux, the installer uses this runtime privately under:

$PREFIX/opt/bun-android-ffi/current/bun
$PREFIX/bin/bun-ffi

It does not replace $PREFIX/bin/bun.

Tested For This Release

  • bun --version
  • bun:ffi dlopen()
  • OpenTUI libopentui.so loading
  • Cline Termux TUI runtime

Not Guaranteed

  • security hardening
  • general replacement for official Bun
  • bun:ffi cc()
  • bun install / bun build behavior on every Termux setup

Source Patch

Base upstream Bun commit:

55f6c899f5

Patch:

patches/bun-android-ffi.patch

To inspect the source change:

git clone https://github.com/oven-sh/bun.git
cd bun
git checkout 55f6c899f5
git apply /path/to/patches/bun-android-ffi.patch

Build Note

The patch includes a local helper:

bash scripts/android-build-env.sh \
  --profile=release \
  --os=linux \
  --arch=aarch64 \
  --abi=android \
  --tinycc=on

That helper reflects the environment used for this build. It may need local adjustment for a different machine.

License

Bun upstream license and linked-library notices are included in LICENSE.md. The release tarball also includes LICENSE.md and NOTICE.md.

Upstream Bun:

https://github.com/oven-sh/bun

About

Tiny release repo for an unofficial experimental Bun Android ARM64 runtime with bun:ffi dlopen enabled for Termux

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors