Problem/Motivation

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

https://bun.sh/blog/bun-v1.0

I tried to compare it with Yarn and Node.
To be honest, I compared with the latest stable version of Yarn: 4.1.0 and node v21.6.0.
Something like this: https://www.drupal.org/project/drupal/issues/3109556

I ran the longest spellcheck:core task and got a 25% speed gain.

Yarn + Node

(time (rm -rf node_modules && yarn cache clean && yarn install && yarn spellcheck:core)) 4>&1

440.45s user 35.59s system 145% cpu 5:28.29 total

Bun

(time (rm -rf node_modules && bun pm cache rm && bun install && bun run spellcheck:core)) 4>&1

333.59s user 33.64s system 130% cpu 4:41.23 total

But main reason for sure its logo so similar to Drupal classic logo ;)

bun

CommentFileSizeAuthor
download.png4.08 KBfinnsky

Issue fork drupal-3420041

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

finnsky created an issue. See original summary.

damienmckenna’s picture

I don't think a gz file should be committed to the repo?

finnsky’s picture

RE: #3

Probably,
I just commited both new Yarn and Bun locks to make tests. This is not final commit :)

nod_’s picture

The perf improvement is nice, but i'm worried about the sustainability of bun, also doesn't really work on window yet.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

gbyte’s picture

The perf improvement is nice, but i'm worried about the sustainability of bun

Two months ago Anthropic acquired bun, so the sustainability is not an issue anymore.
IMO it checks all the boxes now!

nod_’s picture

anthropic doesn't scream sustainable business. Let's revisit this argument after the bubble burst :D

About the windows comment, window is not a supported hosting environment, ok. And we expect people to use ddev to develop Drupal so no windows support should be fine there too.