AI NewsDev toolsAnnouncement

Bun 1.4.3 ships bun check, a TypeScript checker faster than tsc

Bun 1.4.3 adds bun check, a type checker Bun says runs 3x to 6.4x faster than tsc 7.0.2 and uses 2.2x to 4.9x less memory on real projects.

AI News

Editorial3 min read

LinkedInX
Bun v1.4.3 release card

Image: Bun

Why it mattersType checking is a step most teams run on every pull request and on every save in a watcher, so a checker that is a few times faster and lighter frees that CI slot and that laptop fan for other work.

Type checking is the step a developer waits on while the editor fan spins up. Bun 1.4.3 ships its own checker and runs on a stock Next.js tree in 0.28 seconds, against 1.82 seconds for tsc 7.0.2 on the same machine.

Jarred Sumner, who created Bun, published the release. The headline feature is bun check, a port of typescript-go built into the runtime, and the company says it passes 100% of TypeScript 7.0.2's conformance suite: 51,210 tests across errors, types, symbols, declarations and module resolution, all passing. There is no TypeScript package to install and no language server attached, so the editor keeps using TypeScript for in-file errors while bun check runs the full-project pass.

1.24 seconds against 5.98 on the VS Code tree

Bun's own eight-row table was measured on a 16-core Apple silicon Mac. On the VS Code source tree, 9,795 files, bun check ran in 1.24 seconds against 5.98 seconds for tsc 7.0.2, so 4.8 times faster, and used 2.14 GB of memory against 7.97 GB, so 3.7 times less. On Playwright, 706 files, it was 4.2 times faster and used 2.3 times less memory. Across the eight projects, Bun reports 3.0x to 6.4x faster and 2.2x to 4.9x less memory.

Those are Bun's figures on Bun's own hardware. A team adopting it should re-measure on its own project before planning around them.

Where the 72-project parity run disagreed with tsc

Bun separates three kinds of testing. The TypeScript conformance suite covers 51,210 cases, all passing. On top of that, Bun deliberately misconfigured 72 popular repositories, including drizzle-orm, hono, langchainjs, nestjs, next.js, prisma, remix, svelte, vitest and vuejs/core, and compared file, line, column and error code against tsc. The report says 71 of 72 produce identical results. The one mismatch is in vuejs/core, where tsc only reports an error when global.ts comes before model.ts in the files list.

The third track is fuzzing. The release blog says 136,235 fuzzer-generated functions run on each commit with zero mismatches, and 3,032,182 larger offline programs produce 191 mismatches, 162 of which are code that refers to itself while being declared, like class A { x = { a: null! as { p: A["x"] } } }. Those cases are the limit Bun is open about.

--check runs on bun run, bun test and bun build

The flag --check plugs into bun run, bun test and bun build. On a type error, the code does not run, no test runs and nothing is written. --watch runs the check again before every restart. Bun.build({ check: true }) carries the same flag into the programmatic API. A team can verify parity on its own tree by running bunx tsc and bun check side by side and diffing the output, the exact reproduction Bun proposes.

The release also carries runtime work. Bun says it cut idle CPU use by 67 to 89 percent on a sleeping server, added Bun.FetchSession for a group of requests with their own TLS, proxy and keep-alive settings, and shipped an experimental Bun.ModuleGraph for running several copies of one app in one process with separate module state. One hundred and sixty-six issues were closed.

For a team already in TypeScript, the slow step in local development stops being the slow step. A pre-push hook that ran tsc on a 3,547-file Next.js root in 1.28 seconds now has room for a second check in the same budget.

Source

Bun v1.4.3 release blog, by Jarred Sumner. GitHub tag: oven-sh/bun v1.4.3. Benchmark tables, conformance figures, 72-project matrix and fuzzing numbers are all Bun's own, from the release blog.

SourceBun

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project