Bun Officially Supports Android: A Breakthrough for Running Claude Code in Termux and Bringing JavaScript Runtime to Mobile

Bun is about to officially support Android. In practice, this means porting a high-performance JS runtime to the mobile Linux/Bionic environment rather than building native Android apps with Bun. It removes a major blocker for running Claude Code on Android/Termux and enables a lighter-weight way to execute scripts on mobile devices. Keywords: Bun, Android, Claude Code.

Technical Specifications at a Glance

Parameter Details
Project Official Bun Android support
Languages Zig, JavaScript, TypeScript, C/C++ toolchain
Runtime Environment Android, Termux, Bionic libc
Related Protocols Android NDK ABI, PIE executable constraints, adb debugging workflow
Repository Popularity Bun is a high-profile open-source runtime; the source article did not provide an exact star count
Core Dependencies clang 21, Android NDK r27c, Zig, Bionic libc sysroot
Target Architectures aarch64-linux-android, x86_64-linux-android

Bun Support for Android Is Fundamentally a Runtime Port, Not an App Development Solution

Bun’s official Android announcement means one thing at its core: Bun, the JavaScript/TypeScript runtime, is being brought to the Android platform. It is much closer to “a Node.js alternative that runs on Android” than “a way to build Android apps with Bun.”

Juejin

Juejin

This distinction matters because it defines Bun’s value on mobile devices. Its primary strengths are script execution, CLI tooling, agent runtimes, and embedded runtime capabilities—not replacing Kotlin, Java, or Flutter as an application framework.

This Support First Improves the Development Experience in Termux

In the past, developers who wanted to run Bun on Android usually had to rely on community-driven Termux workarounds, sometimes even installing Ubuntu through proot-distro and then patching Bun and related agents to make them work. The chain was long, fragile, and expensive to maintain.

pkg update
pkg install bun
bun --version  # Verify that Bun is available on Android/Termux

This command sequence shows the ideal installation flow once official support lands: install Bun directly in Termux and immediately verify that the runtime works.

Claude Code Will Become Significantly More Usable on Android

The original article points out that starting with v2.1.113, Claude Code switched to a native executable binary instead of remaining a pure Node.js-based solution. That change broke the older Android/Termux compatibility path built around Node.js, making it much harder to run Claude Code on phones.

AI Visual Insight: The image highlights the key takeaway from Bun’s Android support and the outlook for mobile runtime execution. It emphasizes that a JS runtime can now execute inside a phone terminal environment, laying the groundwork for running Bun-based CLI agents such as Claude Code.

AI Visual Insight: The image reflects the compatibility issues Claude Code encountered in Android/Termux scenarios. The central point is that after its distribution model shifted to native binaries, the old Node.js execution path could no longer be reused directly.

AI Visual Insight: The image further shows the runtime errors and adaptation gaps that appeared after the old approach stopped working, indicating that Android now needs a new low-level runtime foundation—and Bun’s official support fills that gap.

Bun maintainers also made this clear in related issues: Android scenarios require follow-up Bun support. In other words, Bun is not merely an optional optimization. It is a critical piece of infrastructure for bringing Claude Code to mobile devices.

AI Visual Insight: The image shows an official issue or discussion thread. The technical point is that Android support is not a peripheral request; it is a foundational dependency directly tied to deploying Claude Code on mobile.

adb tcpip 5555      # Enable wireless debugging from a computer the first time
adb connect localhost:5555  # Establish a debugging connection later in a reachable environment

These commands illustrate a key use case: once Bun and Claude Code can run locally on a phone, they can work with adb to let an agent control Android devices, forming the basis of an “automation assistant on your phone.”

Bun Support for Android Depends on Cross-Compilation and System-Level Adaptation

This implementation is not a simple recompile. It is a full system-level compatibility effort targeting Android user space. The core addition is support for two new targets: aarch64-linux-android and x86_64-linux-android.

AI Visual Insight: The image shows a mobile agent workflow built from Termux, Bun, and adb. It reflects a complete technical loop in which a mobile device executes scripts locally and controls system capabilities through the debugging bridge.

The official implementation path includes three key elements: the host uses clang 21 and the sysroot from Android NDK r27c; Zig handles Bionic libc headers; and the output must be PIE because Android does not allow non-PIE executables to run.

bun build --compile --target=bun-linux-arm64-android your-script.ts

This command demonstrates Bun’s Android-oriented compilation target capability: it compiles a script directly into an artifact suitable for Android.

At a fundamental level, Bun treats Android as “a constrained special Linux environment.” The differences come mainly from Bionic libc, SELinux security restrictions, ABI compatibility, and executable format requirements. So the hard part of Android support is not JavaScript syntax—it is system adaptation.

Official Support Opens Two Highly Practical Adoption Paths

The first path is running JS/TS services, tools, and AI agents directly on a phone. For developers, this means using a faster runtime than Node.js to handle script tasks, automation workflows, and even lightweight service hosting on mobile devices.

The second path is embedding Bun as a dynamic library inside an Android app to provide a high-performance script execution layer. This is especially appealing for apps that need hot-updatable logic, plugin systems, built-in rule engines, or local AI toolchains.

AI Visual Insight: The image emphasizes that Bun can also be loaded by an app in the form of a dynamic library. The technical implication is that Android apps can embed a high-performance JS/TS runtime to gain a local scripting engine, service execution, or extensibility capabilities.

For Developers, the Real Value Is Lowering the Cost of Mobile Experimentation

With official support, developers no longer need to maintain a niche patch set or stay pinned to older Claude Code versions. Once Bun becomes stable in Android package management flows, mobile AI coding, automation testing, and local script execution all become far more practical.

Related Links

FAQ

Q: If Bun supports Android, does that mean I can use Bun to build native Android apps?

A: No. The key point is that Bun runs on Android as a JS/TS runtime, making it suitable for scripts, CLI tools, services, and embedded execution. It is not a replacement for native Android development frameworks.

Q: Why does Claude Code need official Bun support on Android?

A: Because Claude Code has moved to native binaries and no longer depends on a pure Node.js execution path. After the old Termux-based workaround stopped working, Bun’s Android support became a key foundation for running Claude Code on phones.

Q: What are the most important real-world use cases for Bun on Android?

A: The first is running JS/TS tools and AI agents directly in Termux. The second is embedding Bun as a dynamic library inside an app to add high-performance script execution and local automation capabilities to Android applications.

Core Summary: Bun is about to provide official Android support, which means developers will be able to install Bun directly in Termux and run JS/TS projects—or even Claude Code—on a phone. This article explains the technical implementation, Android compatibility details, cross-compilation approach, and the practical value for mobile AI agents.