workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

🚀 Feature Request: Bun Support

Open gunta opened this issue 3 years ago • 10 comments

Describe the solution

Currently, wrangler init doesn't supports Bun.

gunta avatar Sep 13 '23 16:09 gunta

I'll add this comment here, since it is related.

It would be nice for miniflare to support bun:sqlite in addition to better-sqlite3.

When I use bun as a package manager, I find it does not install the bindings correctly for better-sqlite3, and D1 queries throw an error as a result.

timothymiller avatar Sep 14 '23 03:09 timothymiller

@timothymiller

It would be nice for miniflare to support bun:sqlite in addition to better-sqlite3. When I use bun as a package manager, I find it does not install the bindings correctly for better-sqlite3, and D1 queries throw an error as a result.

workerd has a native SQL interface and will no longer need the better-sqlite3 (and thus bun:sqlite) dependency in the future.

elithrar avatar Sep 14 '23 13:09 elithrar

@timothymiller

It would be nice for miniflare to support bun:sqlite in addition to better-sqlite3. When I use bun as a package manager, I find it does not install the bindings correctly for better-sqlite3, and D1 queries throw an error as a result.

workerd has a native SQL interface and will no longer need the better-sqlite3 (and thus bun:sqlite) dependency in the future.

Thank you for providing clarify. Upon further inspection, it seems the opportunity for improvement lies with Drizzle. Their driver for D1 requires better-sqlite3 today. I will get in contact with them.

timothymiller avatar Sep 14 '23 14:09 timothymiller

Thanks for submitting this. I've added a C3 label to this since ultimately this support will need to go there 👍

admah avatar Sep 14 '23 18:09 admah

@timothymiller

It would be nice for miniflare to support bun:sqlite in addition to better-sqlite3. When I use bun as a package manager, I find it does not install the bindings correctly for better-sqlite3, and D1 queries throw an error as a result.

workerd has a native SQL interface and will no longer need the better-sqlite3 (and thus bun:sqlite) dependency in the future.

Is this updated workerd package generally available?

timothymiller avatar Sep 19 '23 22:09 timothymiller

I think this should be reopened now that there is windows support maybe? Since the PR didn't end up implementing bun because of no windows support.

7heMech avatar Dec 04 '24 08:12 7heMech

with the addition of bun:s3, +1

FutureExcited avatar Jan 22 '25 20:01 FutureExcited

Bump on the bun:s3, would pair amazing with R2.

Dawsson avatar Jan 26 '25 22:01 Dawsson

We need Bun on Cloudflare workers. This will also be a big benefit for free users as bun is mostly faster, which results in reduced cpu times.

dr-diffie avatar Feb 07 '25 03:02 dr-diffie

And, will benefit cloudflare as more users will be willing to switch to workers, thus making CF more money

Dawsson avatar Feb 07 '25 03:02 Dawsson