Package Details: bun 1.2.2-3

Git Clone URL: https://aur.archlinux.org/bun.git (read-only, click to copy)
Package Base: bun
Description: Bun is a fast JavaScript all-in-one toolkit. This PKGBUILD builds from source, resulting into a smaller and faster binary depending on your CPU.
Upstream URL: https://github.com/oven-sh/bun
Keywords: bun compile js node ts
Licenses: GPL
Conflicts: bun-bin
Submitter: tiziodcaio
Maintainer: tiziodcaio
Last Packager: tiziodcaio
Votes: 18
Popularity: 0.53
First Submitted: 2023-09-12 21:31 (UTC)
Last Updated: 2025-02-21 07:30 (UTC)

Pinned Comments

tiziodcaio commented on 2025-01-31 09:42 (UTC)

Due to some complains I'll open a copy of the repository on github to get a better ticket system. If you have any issue with bun's packaging, you can also contact me on

https://github.com/tiziodcaio/bun/issues

or you can make a PR to https://github.com/tiziodcaio/bun/pulls

tiziodcaio commented on 2025-01-31 06:42 (UTC)

I need help packaging. Anyone could help as comantainer?

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

micwoj92 commented on 2024-07-16 16:57 (UTC)

Thanks for the update. I think it does clone the repos (or at least webkit) multiple times. One time from git submodule update init and then second time from set-webkit-submodule-to-cmake.sh script.

It would be best to add submodules to sources array: https://wiki.archlinux.org/title/VCS_package_guidelines#Git_submodules

micwoj92 commented on 2024-07-08 21:15 (UTC)

Sorry I can't. I wasn't able to build this, tried without llvm/clang/lld 16 and it failed hence posting this comment. I don't have time nor much reason to build these packages. Prebuild packages probably exist, but I don't really need bun for anything, so I didn't search.

tiziodcaio commented on 2024-07-08 19:17 (UTC)

Hi @micwoj92, this package has been improving significantly in recent months, but I can understand that some dependencies might appear bloated. I promise I'll address this issue as soon as I can, but if you're able to tackle it on your own (it shouldn't be too difficult), that would be great.

micwoj92 commented on 2024-07-08 19:09 (UTC)

Please forgive me for saying "bloat", but is it necessary to download all this bloat? Some things are already added here as either dependencies or make dependencies. Submodules for unnecessary things can be disabled.

==> Starting prepare()...
+ git submodule update --init --recursive --progress --depth=1 --checkout src/bun.js/WebKit src/deps/picohttpparser src/deps/mimalloc src/deps/zlib src/deps/libarchive src/deps/boringssl src/deps/lol-html src/deps/tinycc src/deps/c-ares src/deps/zstd src/deps/ls-hpack src/deps/zig
Submodule 'src/javascript/jsc/WebKit' (https://github.com/oven-sh/WebKit.git) registered for path 'src/bun.js/WebKit'
Submodule 'src/deps/boringssl' (https://github.com/oven-sh/boringssl.git) registered for path 'src/deps/boringssl'
Submodule 'src/deps/c-ares' (https://github.com/c-ares/c-ares.git) registered for path 'src/deps/c-ares'
Submodule 'src/deps/libarchive' (https://github.com/libarchive/libarchive.git) registered for path 'src/deps/libarchive'
Submodule 'src/deps/lol-html' (https://github.com/cloudflare/lol-html) registered for path 'src/deps/lol-html'
Submodule 'src/deps/ls-hpack' (https://github.com/litespeedtech/ls-hpack.git) registered for path 'src/deps/ls-hpack'
Submodule 'src/deps/mimalloc' (https://github.com/Jarred-Sumner/mimalloc.git) registered for path 'src/deps/mimalloc'
Submodule 'src/deps/picohttpparser' (https://github.com/h2o/picohttpparser.git) registered for path 'src/deps/picohttpparser'
Submodule 'src/deps/tinycc' (https://github.com/Jarred-Sumner/tinycc.git) registered for path 'src/deps/tinycc'
Submodule 'zig' (https://github.com/oven-sh/zig) registered for path 'src/deps/zig'
Submodule 'src/deps/zlib' (https://github.com/cloudflare/zlib.git) registered for path 'src/deps/zlib'
Submodule 'src/deps/zstd' (https://github.com/facebook/zstd.git) registered for path 'src/deps/zstd'

tiziodcaio commented on 2024-05-13 20:20 (UTC)

Great! I was searching for a solution for that problem!

ancoron commented on 2024-05-13 06:13 (UTC)

Needed this patch to make it compile (1.1.3):

--- a/src/bun/src/bun.js/bindings/BunProcess.cpp    2024-05-10 11:29:46.060493565 +0200
+++ b/src/bun/src/bun.js/bindings/BunProcess.cpp    2024-05-09 19:21:30.349392343 +0200
@@ -1377,7 +1377,7 @@

         {
             char cwd[PATH_MAX] = { 0 };
-            getcwd(cwd, PATH_MAX);
+            (void) getcwd(cwd, PATH_MAX);

             header->putDirect(vm, JSC::Identifier::fromString(vm, "cwd"_s), JSC::jsString(vm, String::fromUTF8ReplacingInvalidSequences(std::span { reinterpret_cast<const LChar*>(cwd), strlen(cwd) })), 0);
         }
@@ -1870,7 +1870,7 @@
     gid_t egid = getegid();
     JSArray* groups = constructEmptyArray(globalObject, nullptr, static_cast<unsigned int>(ngroups));
     Vector<gid_t> groupVector(ngroups);
-    getgroups(1, &egid);
+    (void) getgroups(1, &egid);
     bool needsEgid = true;
     for (unsigned i = 0; i < ngroups; i++) {
         auto current = groupVector[i];
--- a/src/bun/src/bun.js/bindings/c-bindings.cpp    2024-05-11 19:28:56.388763155 +0200
+++ b/src/bun/src/bun.js/bindings/c-bindings.cpp    2024-05-12 10:56:23.621324067 +0200
@@ -35,7 +35,7 @@
     strcpy(buf, str);
     strcpy(buf + len, url);
     strcpy(buf + len + strlen(url), "\n\0");
-    write(STDERR_FILENO, buf, strlen(buf));
+    (void) write(STDERR_FILENO, buf, strlen(buf));
 }
 #endif

iAndrewT commented on 2024-04-06 07:44 (UTC)

Based on the Rust packaging guidelines, this should have export RUSTUP_TOOLCHAIN=stable in the prepare() and build() steps, at least while Bun is still in the AUR.

I'd also recommend running a shellcheck over the PKGBUILD, ignoring errors about unexported variables. There's a few unquoted strings that rua's shellcheck wrapper is complaining about.

yegorius commented on 2024-03-20 15:17 (UTC) (edited on 2024-03-22 16:12 (UTC) by yegorius)

Having some problems while building 1.0.33:

clang: error: invalid linker name in argument '-fuse-ld=lld'

The fix is to have the latest lld as well (in addition to lld16).

tiziodcaio commented on 2023-12-13 15:15 (UTC)

Sadly is not an issue... You can use bun-bin if you have not built yet. If you prefer a cleaner workflow, I can think about pulling a release of bun as a source, so then I can use that version to bring you the source-compiled version.