4 ms·
Tangibly related: Bun has a built-in S3-compatible client. Bun is a gift, if you're using npm consider making the switch.
by yard2010 1y ago
Tangibly related: Bun has a built-in S3-compatible client. Bun is a gift, if you're using npm consider making the switch.
- neon_me 1y agois there a way to wrap their s3 client for use in HonoJS/CF workers?
- oakesm9 1y agoNo. It's implemented in native code (Zig) inside bun itself and just exposed to developers as a JavaScript API. Source code: https://github.com/oven-sh/bun/tree/6ebad50543bf2c4107d4b4c2ecc062a15a94b71e/src/s3 https://github.com/oven-sh/bun/tree/6ebad50543bf2c4107d4b4c2...
- neon_me 1y ago10/10 Loving it (and how fast it is!) - its just not the use-case that fits my needs. I want maximum ability to "move" my projects among services/vendors/providers
- throawayonthe 1y agoi assume you can just use it[0] in your project and then build (using bun) for cf workers[1] [0] https://bun.sh/docs/api/s3 https://bun.sh/docs/api/s3 [1] https://hono.dev/docs/getting-started/cloudflare-workers https://hono.dev/docs/getting-started/cloudflare-workers \ (https://bun.sh/docs/api/workers https://bun.sh/docs/api/workers ?)
- ChocolateGod 1y agoI tried to go this route of using Bun for everything (Bun.serve, Bun.s3 etc), but was forced back to switch back to NodeJS proper and Express/aws-sdk due to Bun not fully implementing Nodes APIs.
- biorach 1y agoWhat were the most significant missing bits?
- eknkc 1y agoThe worst thing is issues without any visibility. The other day I was toying with the MCP server (https://github.com/modelcontextprotocol/typescript-sdk https://github.com/modelcontextprotocol/typescript-sdk). I default to bun these days and the http based server simply did not register in claude or any other client. No error logs, nothing. After fiddling with my code I simply tried node and it just worked.
- zackify 1y agoIt definitely works in bun just fine. I have a production built mcp server with auth running under bun. Now if you convert the request / response types to native bun server, it can be finicky. But it works fine using express under bun with the official protocol implementation for typescript. Actually writing a book about this too and will be using bun for it https://leanpub.com/creatingmcpserverswithoauth https://leanpub.com/creatingmcpserverswithoauth
- tengbretson 1y agoNot sure about the specific underlying apis, but as of my last attempt, Bun still doesn't support PDF.js (pdfjs-dist), ssh2, or playwright.
- ChocolateGod 1y agolocalAddress is unsupported on sockets, meaning you can not specify an outgoing interface, which is useful if you have multiple network cards.
- pier25 1y agoProividing built APIs to not rely on NPM is one of the most interesting aspects of Bun IMO.
- greener_grass 1y agoCan someone explain the advantage of this? If I want S3 access, I can just use NPM If I don't want S3 access, I don't want it integrated into my runtime
- pier25 1y agoWould you rather use an officially maintained solution or some random package by a random author who might abandon the project (or worse)?
- greener_grass 1y agoThe S3 packages on NPM are maintained by AWS
- pier25 1y agoIndeed but I was arguing about a general point. I'd be surprised if any of your Node projects had less than 100 total deps of which a large number will be maintained by a single person. See Express for example. 66 total deps with 26 deps relying on a single maintainer. https://npmgraph.js.org/?q=express https://npmgraph.js.org/?q=express But even in the case of the official aws-sdk they recently deprecated v2. I now need to update all my not-so-old Node projects to work with the newer version. Probably wouldn't have happened if I had used Bun's S3 client.
- greener_grass 1y agoSo let's put every package under the sun into the client? This approach does not scale. We should make NPM better.
- zackify 1y agoI came here to say the same thing. Rather ship oven/bun through docker and have a 90mb container vs using node.
- deleted 1y ago[deleted]