Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bun/runtime to nx labs #386

Open
Jordan-Hall opened this issue Apr 5, 2024 · 3 comments
Open

Add bun/runtime to nx labs #386

Jordan-Hall opened this issue Apr 5, 2024 · 3 comments

Comments

@Jordan-Hall
Copy link

Jordan-Hall commented Apr 5, 2024

There have been a lot of requests for first-class bun support in NX. (nrwl/nx#22283 & nrwl/nx#21075)
However, I believe it's still too immature, similar to Deno requests. My concern is that there will be too many issues opened as NX issues when they actually relate to Bun, which will pollute the main repo. I also think JS/Node would need to be reevaluated because, unlike Node, Bun is also a bundler, so it could fall under its own SWC/TypeScript solution and inside the JS lib.

Furthermore, a lot of what works in Node will work in Bun too, which means duplicating the generators. I'm proposing introducing Bun into NX-Lab under a new library called runtime. Even if it's Bun, I believe NX Labs will still be the best place for it until the issues drastically drop with Node compatibility.

As @jaysoo noticed in adding Bun package manager nrwl/nx#22602 (comment) they outstanding issues to issues with bun install and private /local registry oven-sh/bun#4901

While i do have nx-bun and I'm in middle of upgrading now IPC been added (no more web workers) I believe it be better served in here.

@gunta
Copy link

gunta commented Apr 19, 2024

Jarred is openly saying that "...if code doesn't work in Bun but does in Node, it's a bug in Bun." -

My concern is that there will be too many issues opened

I believe the above Bun policy is enough of peace-mind to redirect any issue to the Bun repo and keep track of them as they get fixed.

https://x.com/jamonholmgren/status/1707784581758492947

@gunta
Copy link

gunta commented Apr 19, 2024

Target developer population

Besides this, we also have to consider the target developer population.

However, I believe it's still too immature, similar to Deno requests.

While both are "immature" people are already using both in production and making real money.

Star History Chart

Deno history

Deno adoption has been very slow, its main selling points are the module system and security.
Not exactly performance.

Bun history

Developers using Bun are actively looking for fast install, build performance.
Better runtime performance is just a plus.

Bun adoption is already at a higher pace than both Node and Deno.

Bun and Nx common audience

So both Bun users and Nx have the same shared goals: faster builds.
Nx definitely aligns well with Bun goals, and with developers who care about CI build time.

So if Nx doesn't supports Bun natively, I believe the target developer audience might start looking somewhere (such as https://moonrepo.dev )

@Jordan-Hall
Copy link
Author

Worry is looking at the package manager there already missing commands. I still think labs is the best place for it as its experimental still as node compatibility isn't 1 to 1 yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants