I’m wondering about the practicality of offering a bun runtime alternative on Vercel properly in the functions settings so [Node 18.x, Node 20.x, Node 22.x, Bun Latest] rather than as a side runtime to take advantage of things like bytecode precompilation supported in the newest bun releases since currently no platform offers a nice experience for serverless bun taking advantage of some of it’s easy wins especially as Bun’s node api support begins to reach the level where things like running NextJS directly on bun instead of bun → node become practical and easy to set up.
I am aware that you can do a custom runtime on Vercel but stitching in things like bytecode precompilation and proper support for build pipelines on frameworks like next will be a pain if it’s even possible with an extension
It implements Vercel’s Runtime API, so integrating it into Vercel’s standard CI/CD webhook infrastructure requires minimal effort/configuration, unlike the existing Vercel Community custom Bun runtime.
However, it does not integrate natively into Next.js API routes. It requires its own API directory, but can be used in conjunction with standard Next.js API routes. I have done this already: