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

Bun's priorities #798

Open
Jarred-Sumner opened this issue Jul 20, 2022 · 39 comments
Open

Bun's priorities #798

Jarred-Sumner opened this issue Jul 20, 2022 · 39 comments
Labels
tracking An umbrella issue for tracking big features

Comments

@Jarred-Sumner
Copy link
Collaborator

Jarred-Sumner commented Jul 20, 2022

Bun is a large project and it is early days. I think Bun needs to do a better job communicating what is a priority right now and what isn't.

Bun's top priorities:

  1. Improve stability. Bun should not segfault (all segmentation faults are bugs in bun). bun install should work as reliably as npm. We need more testing for error cases throughout Bun's test suite. We need to be running Address Sanitizer regularly and possibly Valgrind as well. We need to do fuzz testing.
  2. Improve Node.js compatibility. There are too many cases where Bun either underperforms or is missing a function. Bun's Node.js compatibility has pretty good breadth, but not enough depth.

PRs that fit in the scope of top priorities will be reviewed ASAP. PRs that do not fit in this scope may take awhile to be reviewed

@Jarred-Sumner Jarred-Sumner pinned this issue Jul 20, 2022
@umararshad4
Copy link

how much time do you think this is gonna take?

@PatrickPrakash
Copy link

how much time do you think this is gonna take?

It depends! @ohsnap4. It's very hard to predict when these priorities can get done in an open-source environment. Everyone is contributing in their spare time. But I think @Jarred-Sumner has a time-goal set up for this, the only thing we can do is to contribute meaningfully to this project.

@KishanBagaria
Copy link
Contributor

As a user, I'd want:

  1. no crashes
  2. complete Node.js drop-in replacement
  3. complete npm/yarn install replacement

2 > 3 since user experience > developer experience. 2 excites me most since it'll immediately speed up a lot of web apps. A good target should be to get Bun.js working with top 100 npm packages without changes to the packages themselves. This opens up an incremental adoption strategy for everyone to switch from node → bun and then optionally translate compat APIs for Node.js to even faster Bun.js equivalents if present.

@SHIMER-jpg
Copy link

I would love to help but feel like I'm to unexperienced yet, any pointers from a more experienced dev as to what to learn to be a little useful?

@factoidforrest
Copy link

How high of a priority do you consider expanded documentation and community outreach to be?

@halffunction
Copy link

I like to use bun in Termux but it didn't worked.

@jooj123
Copy link

jooj123 commented Jul 21, 2022

@Jarred-Sumner firstly great project 👍 love it.

Im wondering how I could help.

My first thoughts was to structure the documentation a bit more concisely, is that something that would be of interest + inline with priorities?

Feels like a wall of text at the moment, maybe as a starting point:

  • Group related things under one heading
  • Split up README.md into multiple files (that reside in ~/docs/*)

@EAGLE1309
Copy link

EAGLE1309 commented Jul 24, 2022

@halffunction

I like to use bun in Termux but it didn't worked.

Facing Same issue here!

@ariesclark
Copy link

Does Bun instead to expose all apis via the Bun global like how it is currently, if so, it could get disorganized very quickly.

@Nugine
Copy link

Nugine commented Jul 25, 2022

Crash issues:

@Perodactyl
Copy link

Will process.stdin and process.stdout ever be implemented?
I guess they might be added for support with chalk

@sno2
Copy link
Collaborator

sno2 commented Jul 25, 2022

@Perodactyl There is a not a feature request regarding that so feel free to create it.

@robogeek
Copy link

Chokidar is an extremely popular package that is core to other extremely popular packages. It currently does not work because fs.watch is not implemented: #832

@FrameMuse
Copy link

FrameMuse commented Jul 28, 2022

Wow, I see so much work and progress going on here, I wish bun the best. I believe it's going to be a breakthrough (if I'm not exaggerating) or at least game changer ^_^

@ryanrussell
Copy link
Contributor

Stability/SegFault improvement update -- #644 appears markedly improved from 1.3.0 -> 1.5.0

More notes in the issue. Incredibly impressive delta in such a short time.

Great work @Jarred-Sumner

@sno2

This comment was marked as resolved.

@ws-rush
Copy link

ws-rush commented Aug 10, 2022

I am totally agree with you in 4, I tried install bun but it fail coz my old cpu

@joeyguerra
Copy link

I'd love to help, but don't want to jump in and duplicate work. Are there directly responsible individuals for these 4 items? Perhaps there's a team/squad working on these that I could get in touch with?

@robogeek
Copy link

Key modules/features that I see missing from Node.js are:

  • fs.watch required by Chokidar
  • dns, tls required by various network tools. I see above that net is missing, but I haven't seen that in my testing
  • child_process required by Commander which is a very popular framework for CLI applications

@marvelbark2
Copy link

Hello, If you need more person involved, I guess you need to create cheat sheet for Zig because it's not popular language or example folder where you can add example about how to add a new Api also how to interact with deps that you choose and code style for better maintenance

@xHyroM
Copy link
Collaborator

xHyroM commented Sep 27, 2022

Hello, If you need more person involved, I guess you need to create cheat sheet for Zig because it's not popular language or example folder where you can add example about how to add a new Api also how to interact with deps that you choose and code style for better maintenance

You can take a look #1115

@Electroid Electroid added the tracking An umbrella issue for tracking big features label Nov 3, 2022
@izznatsir
Copy link

izznatsir commented Dec 12, 2022

async_hooks Node.js polyfill is also missing, required for Prisma.

@wenerme
Copy link

wenerme commented Jan 12, 2023

async_hooks is required for @sequelize/core@7

@vjpr
Copy link
Contributor

vjpr commented Jan 12, 2023

From https://nodejs.org/api/async_hooks.html:

Please migrate away from this API, if you can...We strongly discourage the use of the async_hooks API. Other APIs that can cover most of its use cases...

@Zhomart
Copy link

Zhomart commented Jan 21, 2023

It looks like prisma uses only AsyncResource, which is not deprecated based on this docs - https://nodejs.org/api/async_context.html#class-asyncresource

@Mouvedia
Copy link

Mouvedia commented Feb 25, 2023

A good target should be to get Bun.js working with top 100 npm packages without changes to the packages themselves.

After #​1266 fix, I cursorily tested these:

  • 1 lodash ✓
  • 2 chalk ✓
  • 3 request ✓
  • 4 commander ✓
  • 6 express ✓
  • 7 debug ✓
  • 8 async ✓
  • 9 fs-extra ✗ (a TODO popped up for copySync)
  • 10 moment ✓
  • 14 underscore ✓

During the process, I had some Integrity check failed that required to call bun install twice.
Apart from the fs-extra hiccup, it looks almost stable.


offtopic
After some digging it seems to be related to
lstatSync: { fn: "lstatSync", length: 1 },

i.e. the TODO means it doesn't support the options argument which has only one property (bigint)

fixed

@Majoramari
Copy link

I like the project!

@alexgleason
Copy link

Can't wait to run my JS code in based Zig instead of cringe Rust.

@derrickmehaffy
Copy link

Would really love to see some love for Koa as well and not just express as I happened across bun and would love to see if I can get it to work with https://github.com/strapi/strapi as I'm quite interested in the performance increases.

Who knows, maybe one day we would see Strapi rewritten in bun instead of Node :)

@alexgleason
Copy link

I have a big complicated Node.js Webpack project that I was skeptical would actually run in Bun. I had to nuke my node_modules and fix exactly 3 type errors to make it work. The "drop-in" replacement is not a lie, and for that you get a slow clap. 👏

@reediculous456
Copy link

From nodejs.org/api/async_hooks.html:

Please migrate away from this API, if you can...We strongly discourage the use of the async_hooks API. Other APIs that can cover most of its use cases...

While I understand that Node itself recommends not using this API, I think it should be included in bun for compatibility reasons. Sequelize is one of (if not the) biggest JS ORMs so to have it not work in bun make all of my projects incompatible with the bun runtime

@Pandapip1

This comment was marked as resolved.

@folkol
Copy link

folkol commented Sep 16, 2023

I would love to help but feel like I'm to unexperienced yet, any pointers from a more experienced dev as to what to learn to be a little useful?

One thing that is really helpful and can be pretty tedious to produce — but can be done without deep technical expertise — is to produce small test cases that reproduces bugs. See https://en.wikipedia.org/wiki/Minimal_reproducible_example. (For example: someone reports that "it crashes for this repo" -> "these 3 lines of code consistently reproduces the crash".)

@organnerx
Copy link

I suggest considering implementing "dgram" from Node.js, since server application should be able to accept and send UDP packets, and not only TCP. Strangely no one yet mentioned it, but UDP is widely used for game servers.

@aleclarson
Copy link

When can support for VS Code step debugging be prioritized? Thanks

@acoyfellow
Copy link

Any insight as to where Firestore sits on the priority queue?

@touhidurrr
Copy link

I know that the amount of issues bun gets might be overwhelming but sometimes I feel like maintainers should read each issue at least once before deciding if an issue needs to be prioritized or not. This is because I sometimes feel like even if an issue is supposed to get priority based on the cases listed here, they often get ignored because the title might not refer to that specifically. But after reading the issue itself you realize that it needs to be addressed sooner.

@mallusrgreatv2
Copy link

mallusrgreatv2 commented Apr 22, 2024

There are way too many segfaults (on Windows atleast). Simply running some basic code (using the discord.js package, if that's related) ends up in a segfault. Seems like there's already an issue for my exact error (there's no message, just segfault at x address), but upon looking through the other issues, I can see a bunch of other segfaults

@zackradisic zackradisic unpinned this issue May 13, 2024
@nektro nektro pinned this issue May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracking An umbrella issue for tracking big features
Projects
None yet
Development

No branches or pull requests