termux-packages
termux-packages copied to clipboard
[Package]: Bun
Package description
Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and npm client built-in.
Home page URL
https://bun.sh
Source code URL
https://github.com/Jarred-Sumner/bun
Packaging policy acknowledgement
- [X] I have read and understand the Packaging Policy.
Additional information
No response
Bun now supports Linux aarch64. From oven-sh/bun#75.
However, downloading and using it results in error.
bash: ./bun: No such file or directory
That's because it will need to be an Android aarch64 build.
Same if using npm
to install.
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin,linux","arch":"arm64,x64"} (current: {"os":"android","arch":"arm64"})
npm ERR! notsup Valid OS: darwin,linux
npm ERR! notsup Valid Arch: arm64,x64
npm ERR! notsup Actual OS: android
npm ERR! notsup Actual Arch: arm64
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2023-02-10T08_22_51_052Z-debug-0.log
Bun has released support for aarch64 so I hope this will get added soon!
Any update?
you should use grun (glibc for termux) to run bun aarch64, use grun ./bun ...
you should use grun (glibc for termux) to run bun aarch64, use grun ./bun ...
How to get the grun(glibc), i have try to pkg install glibc
and it not found
How to get the grun(glibc), i have try to
pkg install glibc
and it not found
https://wiki.termux.com/wiki/Switching_package_manager
https://github.com/termux-pacman/glibc-packages
How to get the grun(glibc), i have try to
pkg install glibc
and it not foundhttps://wiki.termux.com/wiki/Switching_package_manager
https://github.com/termux-pacman/glibc-packages
If you only want to use pacman
for the gpkg-dev
repo, then it is not necessary to completely switch to pacman
as the default package manager.
It's work, thanks @2096779623 @Maxython
Maybe bun
should be added to the TUR repository.
Bun cannot be added to termux yet. I don’t know what’s that grun thing is. But I tried building bun and it requires latest zig which has some breaking changes from what we have in termux. Ig we need to update zig first.
This is the error
./build.zig:51:9: error: no member named 'source' in struct 'std.build.Pkg'
[460](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:461)
.source = pkgPath("src/bun_redirect.zig"),
[461](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:462)
^
[462](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:463)
./build.zig:323:32: note: called from here
[463](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:464)
try addInternalPackages(
[464](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:465)
^
[465](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:466)
./build.zig:207:43: note: called from here
[466](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:467)
pub fn build(b: *std.build.Builder) !void {
[467](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:468)
^
[468](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:469)
./build.zig:178:79: error: no member named 'mode' in struct 'std.fs.file.OpenFlags'
[469](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:470)
var runtime_out_file = try std.fs.cwd().openFile("src/runtime.out.js", .{ .mode = .read_only });
[470](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:471)
^
[471](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:472)
./build.zig:12:9: error: no member named 'addIncludePath' in struct 'std.build.LibExeObjStep'
[472](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:473)
step.addIncludePath("src/deps");
[473](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:474)
^
[474](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:475)
./build.zig:320:20: note: called from here
[475](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:476)
addPicoHTTP(obj, false);
[476](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:477)
^
[477](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:478)
./build.zig:207:43: note: called from here
[478](https://github.com/SunPodder/termux-packages/actions/runs/4214755107/jobs/7315425240#step:6:479)
pub fn build(b: *std.build.Builder) !void {
https://devlog.hexops.com/2023/zig-0-11-breaking-build-changes/
Any updates? I need the package too
Any updates? I need the package too
If see from Bun release, it can install with npm, but idk it work on termux or not
No, bun
must be built from source into a package to be able to be installed in Termux.
Using npm
will error out if used to install bun
that way.
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin,linux","cpu":"arm64,x64"} (current: {"os":"android","cpu":"arm64"})
npm ERR! notsup Valid os: darwin,linux
npm ERR! notsup Actual os: android
npm ERR! notsup Valid cpu: arm64,x64
npm ERR! notsup Actual cpu: arm64
npm ERR! A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2023-06-20T05_55_23_614Z-debug-0.log
No,
bun
must be built from source into a package to be able to be installed in Termux.Using
npm
will error out if used to installbun
that way.npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin,linux","cpu":"arm64,x64"} (current: {"os":"android","cpu":"arm64"}) npm ERR! notsup Valid os: darwin,linux npm ERR! notsup Actual os: android npm ERR! notsup Valid cpu: arm64,x64 npm ERR! notsup Actual cpu: arm64 npm ERR! A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2023-06-20T05_55_23_614Z-debug-0.log
I just downloaded it from their releases and it work ig.
idk how I got grun, I installed it over a year ago. but it provides glibc runtime iirc
thanks @Maxython got it working and made an alias
alias bun='grun ~/.bun/bin/bun'
Bun cannot be added to termux yet. I don’t know what’s that grun thing is. But I tried building bun and it requires latest zig which has some breaking changes from what we have in termux. Ig we need to update zig first.
Latest version of zig is available on termux now.
Bun cannot be added to termux yet. I don’t know what’s that grun thing is. But I tried building bun and it requires latest zig which has some breaking changes from what we have in termux. Ig we need to update zig first.
Latest version of zig is available on termux now.
Yeah I have looked into it. Currently there's no official way to cross compile bun. Moreover, building bun requires a pre-built bun executable. So there's no way to build it on-device either.
@HaccerCat @holiq does grun bun install
work for you? I'm using bun 1.0.0 and it doesn't work.
bun install glob
bun add v1.0.0 (822a00c4)
installed [email protected] with binaries:
- glob
Failed to install 41 packages
error: AccessDenied installing bun-types
error: AccessDenied installing glob
error: AccessDenied installing foreground-child
error: AccessDenied installing jackspeak
error: AccessDenied installing minimatch
error: AccessDenied installing minipass
error: AccessDenied installing path-scurry
error: AccessDenied installing cross-spawn
...
According to the official docs...
Bun must be installed to compile Bun
Wow, just wow. Why the heck don't the Bun devs directly use ESBuild to bundle and minify those files instead?
@HaccerCat @holiq does
grun bun install
work for you? I'm using bun 1.0.0 and it doesn't work.bun install glob bun add v1.0.0 (822a00c4) installed [email protected] with binaries: - glob Failed to install 41 packages error: AccessDenied installing bun-types error: AccessDenied installing glob error: AccessDenied installing foreground-child error: AccessDenied installing jackspeak error: AccessDenied installing minimatch error: AccessDenied installing minipass error: AccessDenied installing path-scurry error: AccessDenied installing cross-spawn ...
Try this:
bun install --backend=copyfile glob
@HaccerCat @holiq does
grun bun install
work for you? I'm using bun 1.0.0 and it doesn't work.bun install glob bun add v1.0.0 (822a00c4) installed [email protected] with binaries: - glob Failed to install 41 packages error: AccessDenied installing bun-types error: AccessDenied installing glob error: AccessDenied installing foreground-child error: AccessDenied installing jackspeak error: AccessDenied installing minimatch error: AccessDenied installing minipass error: AccessDenied installing path-scurry error: AccessDenied installing cross-spawn ...
that's because bun tries to create hardlinks
@HaccerCat @holiq does
grun bun install
work for you? I'm using bun 1.0.0 and it doesn't work.bun install glob bun add v1.0.0 (822a00c4) installed [email protected] with binaries: - glob Failed to install 41 packages error: AccessDenied installing bun-types error: AccessDenied installing glob error: AccessDenied installing foreground-child error: AccessDenied installing jackspeak error: AccessDenied installing minimatch error: AccessDenied installing minipass error: AccessDenied installing path-scurry error: AccessDenied installing cross-spawn ...
I did not try 1.0 and actually did not use bun since a long time, but last time I used bun install
I got a kernel or syscall error I forgot 😆
@HaccerCat @holiq does
grun bun install
work for you? I'm using bun 1.0.0 and it doesn't work.bun install glob bun add v1.0.0 (822a00c4) installed [email protected] with binaries: - glob Failed to install 41 packages error: AccessDenied installing bun-types error: AccessDenied installing glob error: AccessDenied installing foreground-child error: AccessDenied installing jackspeak error: AccessDenied installing minimatch error: AccessDenied installing minipass error: AccessDenied installing path-scurry error: AccessDenied installing cross-spawn ...
No bro, I haven't tried it
It's work, thanks @2096779623 @Maxython
Can u please tell me also, what I have to do.
I am very beginner in linux (in termux too)
** Please provide step by step guide, (commends if possible)**
# my state
bun
exec: Failed to execute process '/data/data/com.termux/files/home/.bun/bin/bun': The file exists and is executable. Check the interpreter or linker?