framework-promessas-e-bun-o-lock-in-que-voce-nao-ve
title: 'Framework, promises and Bun: the lock-in you don't see' description: >- A dev swore never to buy Framework again. Here's what that rant teaches about betting on Bun without getting stuck to a promise. date: 2026-11-22T00:00:00.000Z cover: /blog/framework-promessas-e-bun-o-lock-in-que-voce-nao-ve.jpg tags:
- Bun
- Open Source
- Tools author: Diego Horvatti linkedin: >- I once trusted a laptop because of the promise that I could swap parts later.
This week I read a rant from a dev who paid a lot for a Framework and regretted it. What caught me was the pattern, more than the hardware.
We adopt tools because of a promise, and Bun is no exception. I use it every day and don't plan to switch.
But what locks you into a runtime is your code, not Bun. I ran a grep for
Bun. in two projects: one had 3 files, the other had 61. Guess which team
was afraid to upgrade.
Modularity you've never tested is just marketing with screws.
I wrote about how to keep the runtime API in one known place without falling into too much abstraction. The link is in the comments.
#Bun #TypeScript #JavaScript #SoftwareArchitecture #SoftwareDevelopment
This week a developer published a post with a title that leaves no doubt: I'll never buy Framework hardware again. Framework is the modular laptop brand. The one that promises you can swap ports, screen, keyboard and motherboard without throwing the rest away. It may seem odd to talk about this on a blog that lives on Bun, TypeScript and Postgres. But the story has everything to do with the runtime you picked for your last project.
What happened with Framework
The summary is simple. The person bought the hardware for the promise. Repairable, modular, built to last. In practice, the experience didn't match the pitch, and the post is a record of that frustration. The details are in the original text and it's worth reading in full, because it's the story of someone who paid a lot to believe in an idea.
I won't judge Framework here. I never owned the laptop and I never tested their support. What caught my attention was something else: the pattern.
You buy a product for its promise, not for what it does today. "You can swap the part later." "There will be upgrades." "The community maintains it." When the promise fails, the loss isn't just the product. It's the time you invested around it.
Why this matters if you use Bun
Dev tools work the same way. Nobody adopts Bun just because it runs bun install faster today. You adopt it for the promise:
- Ever-growing Node compatibility.
- One binary that is runtime, bundler, test runner and package manager.
- A project that will keep being maintained at this pace.
And Bun delivered on a good part of that. bun.lock became readable text in 1.2. Bun.sql and Bun.s3 solve things that used to need three dependencies. I use it every day and don't plan to switch.
But Bun also changed owners. Anthropic bought the project at the end of 2025. So far, that has brought more people working on it and no license change. Great. But it's exactly the kind of event that reminds you a tool's promise depends on decisions you don't control.
Modularity you've never tested is just marketing with screws.
It works for laptops. It works for runtimes.
Does Bun lock you in? It depends on how you write
Here's the practical part. Bun doesn't lock you in on its own. What locks you in is the code you write on top of it.
Look at this snippet, which shows up in a lot of projects I review:
// everything tied to the runtime
const file = Bun.file('./config.json')
const config = await file.json()
const db = new Bun.SQL(process.env.DATABASE_URL)
const users = await db`select * from users`
Bun.serve({ fetch: () => new Response('ok') })
It works beautifully. And it runs nowhere else. If tomorrow you need to deploy this to an environment that only accepts Node, or if a Bun regression blocks your deploy, you rewrite half the project.
Now the version with a thin layer:
// infra/db.ts
import { SQL } from 'bun'
export const db = new SQL(process.env.DATABASE_URL)
// infra/fs.ts
export const readJson = async (path: string) =>
JSON.parse(await Bun.file(path).text())
The rest of the code imports db and readJson. It doesn't import Bun. If you ever need to switch, you touch two files, not forty. It's not hexagonal architecture. It's not an interface with a single implementation. It's just keeping the runtime-specific API living in a known place.
The HTTP server follows the same logic. If you write handlers in the Request => Response style, they run on Bun, on Deno, on Node with an adapter and on almost every serverless platform. Hono, for example, is popular precisely because of that.
How to really test your "modularity"
The biggest lesson from the Framework post, at least for me, is this: a repair promise only counts if someone has already done the repair. Tools are the same. You only know you can leave Bun if you've already tried.
A cheap test I recommend:
- Run your test suite on Node every now and then. If you use
bun:test, tests withdescribe,itandexpectusually move to Vitest with few changes. - Search the project for
Bun.and for imports from'bun'. Count how many files show up. - If the number is more than a handful, the runtime has leaked into your business logic.
grep -rlE "Bun\.|from 'bun'" src | wc -l
On my last project it was 3. On a project I reviewed last month it was 61. Guess which of the two the team was afraid to upgrade.
That number isn't a goal. It's a thermometer. Small project, internal script, a CLI only you use: go ahead and use Bun. freely and be happy. The problem is the system that will live for five years and pays someone's salary.
The objection: "so I shouldn't use anything specific?"
That's not it. If you avoid every specific API, you lose the reason you picked Bun in the first place. Bun.sql is faster and simpler than a lot of drivers out there. The built-in bundler saves you config. Ignoring that would be silly.
The math is different. Use what's specific, but know where it is. Put it in a folder. Give it a name. Treat it the way you'd treat a hardware vendor: trust them, but keep the receipt.
And there's a real cost at the opposite extreme too. I've seen a team build a "runtime abstraction" layer with ten interfaces just to swap a readFile. Nobody ever swapped it. The layer became the hardest part of the system to understand. There's a middle ground.
What I take from this
The Framework post is a rant, and rants are useful because they remind us that a promise is not the same as delivery. I'm still betting on Bun. I think it's the best JavaScript runtime experience out there today, and I'm not being diplomatic.
But a good bet is one you can undo. With a laptop, that means checking that the spare part exists before you need it. In code, it means knowing exactly how many files depend on the runtime before the day it matters. Spoiler: that day always lands on a Friday.
If you want to see how I organize these layers in practice, take a look at the projects I maintain.