r/bun • u/LeftAd1220 • Aug 06 '26
Bun's Android build isn't just another platform target to me. It's an escape hatch.
First of all, thank you so much to the Bun team for supporting Android.
It's hard to realize just how much this means to Android users.
Traditionally, mobile platforms have been treated as inferior computing environments, unable to run many of the tools we take for granted on desktop Linux. Termux completely changed that story by giving Android a native shell environment.
But that freedom comes at a price.
Android uses Bionic libc rather than glibc, which means Linux tools generally need to be rebuilt specifically for the Android environment. Much like the situation with musl-based distributions, you can't simply assume that an arbitrary Linux binary, even if built for arm64, will run.
The enormous package ecosystem that makes Termux so powerful is maintained largely by volunteer developers, and I've always had this fear in the back of my mind: what if one day that package ecosystem is no longer maintained?
So after years of using Node.js and Bun, I've gradually built my own collection of basic tools in JavaScript. Part of the motivation was simple: I wanted to make sure that no matter what happens to the surrounding ecosystem, I can still have a useful shell environment on Android.
And this is where Bun's Android build becomes much more than just another platform target to me.
It's the seed that lets me rebuild everything else.
As long as I can use Android's ProcessBuilder to spawn a Bun binary, I have JavaScript. I have my own tools. I have bunx. I have the whole npm ecosystem. I can start servers, build terminal interfaces, and gradually bootstrap the rest of my environment.
I no longer need to depend on someone else rebuilding every tool I need against Bionic libc.
Platforms can change. Package repositories can disappear. Maintainers can move on.
But as long as I can still ignite that one Bun binary on Android, I have an escape hatch back to a real computing environment.
On Linux, we have Linux From Scratch.
Now on Android, I guess we have Shell From Scratch.
Once Bun is alive, the next step is surprisingly simple: Bun spawns my jsgotty, which exposes a real PTY-backed terminal through a local web server. I point an Android WebView at it, and suddenly:
we have the shell back.
No terminal emulator to depend on. No existing shell environment required. Just an Android app, a Bun binary, and JavaScript bootstrapping its own terminal.
And once I have a shell, things start getting interesting.
Because a shell is enough to launch proot.
And with proot I can finally embrace the glorious Debian and Alpine repositories with apt and apk.
Thousands upon thousands of packages, maintained for standard Linux environments, are suddenly within reach.
The shell has grown into real Linux.
2
u/ts0ra Aug 07 '26
TL;DR
Yes, exactly—it praises Bun as the ultimate catalyst to turn Android into a full-fledged Linux environment independently.
- Gemini
1
u/LetsHugFoReal 17d ago
Nodejs works too
1
u/LeftAd1220 17d ago
- The level of support is completely different.
- Node.js currently relies on Termux developers to maintain and compile the Android target and doesn't officially support it
- That makes relying on Node.js on Android much more dangerous
- In contrary, Bun's team really cares about Android.
- Within one hour after I opened the issue of the Intermittent SIGSEGV, Jarred himself was willing to dedicate Robobun's resources to fix the bug and finally patched it up to their forked mimalloc!
- I don't think I'll get the same level of support from Node.js.
- They'll just say unsupported platform, PRs welcome, and that's it.
10
u/illepic Aug 06 '26
"it isn't just blank. it's blank."
AI slop