Open n0thhhing opened 7 months ago
Thanks for opening this issue with detailed ideas/workarounds. We have too many other things to prioritize over Android/Termux. If we add it to our docs, there is an implicit expectation that it is a supported platform, when in reality it is not.
understandable, Considering the recent launch of Bun and other urgent matters, addressing concerns related to native Termux may not be the current primary focus. also, prioritizing support for Windows as of now is crucial to avoid potential complications from simultaneous extensive updates, which could negatively impact the ecosystem and workflow.
I made a shell script termux-pacman-glibc-setup.sh to setup glibc-runner
with pacman on Termux and install Deno.JS and Bun.JS as a demo.
What is the type of issue?
Documentation is missing
What is the issue?
Missing Docs for Termux users
Intro
While the primary focus of Bun is not currently on Android platforms like Termux, this aims to help Termux users install and use Bun smoothly.
installation
To begin, refer to the official Bun installation documentation using the following command:
However, after installation, attempting to use Bun may result in a
Command not found
error.Solutions
Native Termux
grun
to process the binary correctly.vim ~/.zshrc
).Downsides
While this solution has its usecases, there are some downsides to consider:
Packages Are Limited:
Due to limitations with
grun
, Bun may encounter difficulties reading and processing node modules, resulting in errors like:Limited Functionality:
As of now, due to native permissions and issues with
grun
, the Bun binary isn't fully processed. Consequently, certain operations may not work correctly:Installing packages:
Using features like
bunx
or Bun's REPL:#
Proot distro
For installation and usage of Bun on Termux with a better approach, follow these steps:
Open your preferred configuration file (e.g.,
vim ~/.zshrc
).Add the alias:
downsides
Installing Packages: Due to Bun not being optimized for Android architectures, it lacks the necessary permissions to access node_modules. However, a fix is available. Update your configuration file with the following:
Additional Notes
This doesn't intend to force developers to prioritize Termux support but serves as a guide for those with limited access to environments like Termux. Ideas and fixes presented here are mostly original, with clarifications drawn from insightful comments on related issues.
credits:
Special thanks to issue #5085 for providing insights into fixing package installations. Additionally, credit goes to Denos fix for addressing similar usage issues.
Where Did You Find It?
This issue post aims to address missing documentation for Bun on Termux. It is *not intended to compel developers to prioritize Termux support but rather serves as guidance for users with limited access to environments like Termux. The outlined solutions and insights are derived from mostly original ideas with additional clarification from comments on related issues, particularly issue #5085 and Denos fix.