oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
71.78k stars 2.55k forks source link

Support 32-bit ARM CPUs (currently arm64 only) #5060

Open volumio opened 9 months ago

volumio commented 9 months ago

What is the problem this feature would solve?

There are plenty of devices (especially embededd) that run arm 32 bit OSes, the most famous one is Raspberry PI. Bun looks like an excellent choise to run edge intelligence \ IoT servers, however at this time bun offers only arm64 binaries, which prevents it to be use on this vast plethora of OSes (very few embedded OSes are 64 bit) which power this small SBCs.

For instance, our OS (based on Debian) runs on about a dozen of such SBCs and just one of them has a vendor BSP with 64 bit kernel, therefore to maximize compatibility we only provide a 32 bit BSP. The same is true for Raspberry PI, which only offers 64bit kernel for just the version 4.

IMHO reconfiguring the CI to provide arm binaries will open Bun to a wider userbase and usecases, given that it's architecture can allow for 32 bit operations.

Happy to help outline such usecases and help where necessary.

What is the feature you are proposing to solve the problem?

Provide compiled binaries for arm platform, along with arm64 and x64

What alternatives have you considered?

No response

jedahan commented 9 months ago

At the very least, the bun installer should bail if its not supported by a platform:

micro@plotter:~/saxi $ bun -h
-bash: /home/micro/.bun/bin/bun: cannot execute binary file: Exec format error

micro@plotter:~/saxi $ file `which bun`
/home/micro/.bun/bin/bun: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=b1fa99f0ee7ad7d3, stripped

micro@plotter:~/saxi $ file `which cat`
/usr/bin/cat: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=252df9753723cf41de9967fcc623ca08c527bdc6, for GNU/Linux 3.2.0, stripped
mfiumara commented 7 months ago

Would also be interested, specifically for raspberry pi usecases

supreme-helix commented 4 months ago

Please fix

Flecart commented 2 months ago

Watching here.

patrickelectric commented 1 month ago

That would be really nice!