sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.07k stars 118 forks source link

Technique for using bun (build) instead of esbuild? #490

Closed gitblit closed 2 weeks ago

gitblit commented 3 weeks ago

I'm a bun fan boy and am currently dabbling with Serverless Framework lambda containers to deploy some small bun apis, despite slow cold starts. I'm looking ahead to what I might use to replace SF in the future and SST ion is the leading contender. I've read through #179 and am looking forward to that possible future state where I can point to a custom runtime or layer for More Bun.

In the meantime, I am wondering if it's been considered to better integrate with bun for "live"? I am currently using bun macros which esbuild doesn't like very much. I'm also using some other bun-specific apis, but that's a future deployment-time problem, not a live build-time limitation.

image

I couldn't quite figure a way to configure SST to use bun instead of esbuild so my guess is this is not supported, which is reasonable; it's still early days.

Thanks for your consideration.

jayair commented 3 weeks ago

I'm gonna guess this is not on our immediate roadmap but we do want to expand our bun usage internally.

thdxr commented 3 weeks ago

our system is roughly designed to support additional runtimes but we haven't implemented anything besides nodejs and workers - we will do bun as there's more demand for it

thdxr commented 2 weeks ago

closing this for now