ChocolateGod 6 days ago

I 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 6 days ago

    What were the most significant missing bits?

    • eknkc 6 days ago

      The worst thing is issues without any visibility.

      The other day I was toying with the MCP server (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 6 days ago

        It 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

    • tengbretson 6 days ago

      Not 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 6 days ago

      localAddress is unsupported on sockets, meaning you can not specify an outgoing interface, which is useful if you have multiple network cards.

pier25 6 days ago

Proividing built APIs to not rely on NPM is one of the most interesting aspects of Bun IMO.

  • greener_grass 6 days ago

    Can 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 6 days ago

      Would you rather use an officially maintained solution or some random package by a random author who might abandon the project (or worse)?

neon_me 6 days ago

is there a way to wrap their s3 client for use in HonoJS/CF workers?

zackify 6 days ago

I came here to say the same thing.

Rather ship oven/bun through docker and have a 90mb container vs using node.