oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.57k stars 2.72k forks source link

Bun's priorities #798

Open Jarred-Sumner opened 2 years ago

Jarred-Sumner commented 2 years ago

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

umararshad4 commented 2 years ago

how much time do you think this is gonna take?

PatrickPrakash commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

halffunction commented 2 years ago

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

jooj123 commented 2 years ago

@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:

EAGLE1309 commented 2 years ago

@halffunction

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

Facing Same issue here!

ariesclark commented 2 years ago

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 commented 2 years ago

Crash issues:

Perodactyl commented 2 years ago

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

sno2 commented 2 years ago

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

robogeek commented 2 years ago

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: https://github.com/oven-sh/bun/issues/832

FrameMuse commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

SegmentationFault issues:

Why not give them a label "segfault"?

I have done so, thanks for the advice.

xhyrom commented 2 years ago

node.js/polyfill issues:

ws-rush commented 2 years ago

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

joeyguerra commented 2 years ago

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 commented 2 years ago

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

marvelbark2 commented 2 years ago

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 commented 2 years ago

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 https://github.com/oven-sh/bun/pull/1115

izznatsir commented 1 year ago

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

wenerme commented 1 year ago

async_hooks is required for @sequelize/core@7

vjpr commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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:

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 commented 1 year ago

I like the project!

alexgleason commented 1 year ago

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

derrickmehaffy commented 1 year ago

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 commented 1 year ago

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. :clap:

reediculous456 commented 1 year ago

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 commented 1 year ago

@xHyroM https://github.com/oven-sh/bun/issues/5288 should be added to https://github.com/oven-sh/bun/issues/798#issuecomment-1204775143

folkol commented 1 year ago

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 commented 8 months ago

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 commented 6 months ago

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

acoyfellow commented 5 months ago

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

touhidurrr commented 5 months ago

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 commented 5 months ago

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

aralroca commented 4 months ago

About the missing routemap tasks: CSS Parser, IIFE module export, etc, it would be nice to add a list with a prioritization order. It would help a lot to those of us who are developing libraries/frameworks based on Bun to know also the order in which things are going to arrive, even if it is approximate.

sambacha commented 4 months ago

@Jarred-Sumner and the bun team you may find this useful for helping with organizing issues and the respective priorities, its a github app https://sweetjab.com/