News for hackers. Stuff that matters.
Re:Rewriting Bun in Rust by malisper on Wednesday July 08, 2026 @08:45PM (#48839487)
I can confirm a naive rewrite won't make things faster. I've been working on rewriting Postgres in Rust. I rewrote things function by function similar to how Jarred did. Even though the new Rust code mapped closely with the previous C code, it was 8x slower. This was due to myriad of reasons. For example naively converting a C union into a Rust enum can be slower because Rust stores a tag with the enum, while C unions do not.

I've been working on a new rewrite that's focused on beating Postgres on performance. As of this morning I got to 100% of the tests passing and have meaningful performance gains over Postgres.

Re:Rewriting Bun in Rust by nvader on Wednesday July 08, 2026 @10:35PM (#48840300)
I hope that you're going to call it PostGrust.
Re:Rewriting Bun in Rust by agumonkey on Thursday July 09, 2026 @03:27AM (#48842158)
Then you'll have postgrest on postgrust
Re:Rewriting Bun in Rust by SwiftyBug on Thursday July 09, 2026 @07:24AM (#48844121)
Na, PostPostgres would be much cooler.
Re:Rewriting Bun in Rust by xeromal on Wednesday July 08, 2026 @11:55PM (#48840799)
Would love to follow your journey!
Re:Rewriting Bun in Rust by malisper on Thursday July 09, 2026 @12:38AM (#48841051)
If you want to follow along, I've been writing about it on my blog (https://malisper.me/) an you can follow the github repo here: https://github.com/malisper/pgrust
Re:Rewriting Bun in Rust by xeromal on Thursday July 09, 2026 @12:47AM (#48841104)
Bookmarked. I love ambitious projects like this. I'll check in!
Re:Rewriting Bun in Rust by egorfine on Thursday July 09, 2026 @04:34AM (#48842721)
I find it curious that people who take other's people product and rewrite in their favorite programming language still name their own creation the name of the original one.

Like, you have now created your own new database engine that happens to be compatible with Postgres. Wouldn't you take an absolute pride in giving it your own name? Why call it "Postgres rewrite in <programming language>"?

Re:Rewriting Bun in Rust by khuey on Thursday July 09, 2026 @06:53AM (#48843840)
If they did the opposite and called it Mygres or whatever people would give them shit for that too.
Re:Rewriting Bun in Rust by psychoslave on Thursday July 09, 2026 @06:16AM (#48843527)
Maybe not everyone is utterly obsessed with vanity and its delusion?
Re:Rewriting Bun in Rust by egorfine on Thursday July 09, 2026 @11:57AM (#48848054)
Then why use someone else's established brand for your toy project?
Re:Rewriting Bun in Rust by psychoslave on Friday July 10, 2026 @01:32AM (#48856074)
If this is still speaking about the Postgres rewrite in Rust, then naming it something like pgrust[1] makes sense for ease of discovery for anyone aware of these technologies.

[1] https://github.com/malisper/pgrust I guess