GORM VS bun

Compare GORM vs bun and see what are their differences.

GORM

The fantastic ORM library for Golang, aims to be developer friendly (by go-gorm)

bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one (by oven-sh)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
GORM bun
74 284
35,273 70,020
1.1% 2.3%
8.4 10.0
4 days ago 4 days ago
Go Zig
MIT License -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

GORM

Posts with mentions or reviews of GORM. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-18.
  • Go ORMs Compared
    5 projects | dev.to | 18 Jan 2024
    GORM is a comprehensive ORM tool in Go, offering a code-first approach which allows defining database schemas using struct tags in Go. It's known for its developer-friendly nature, making it suitable for both beginners and experienced users. GORM supports a variety of SQL databases like MySQL, PostgreSQL, and SQLite. It's designed to be flexible, allowing developers to drop down to raw SQL when necessary. However, it's important to be cautious about its performance implications in large-scale applications.
  • 6 🔥 Awesome Golang packages (web devs)
    6 projects | dev.to | 4 Dec 2023
    Homepage: https://gorm.io/
  • Tenha controle sobre seu SQL com Golang e SQLC
    3 projects | dev.to | 25 Nov 2023
  • Build an Event-Driven Uptime Monitor in Go 🚀
    2 projects | dev.to | 20 Oct 2023
    Since most of these APIs will be simple CRUD (Create/Read/Update/Delete) endpoints, let's build this service using GORM, an ORM library that makes building CRUD endpoints really simple.
  • [OpenSource] I am building high performance Plex alternative in Go for Movies and TV Show
    8 projects | /r/golang | 2 Jun 2023
  • Building Robust Applications in Go: Integrating Envconfig, Gorm, and OpenSearch
    3 projects | dev.to | 24 May 2023
    After successfully configuring the application, it's time to delve into integrating the data layer. For this purpose, I will utilize gorm, a powerful SQL ORM that facilitates rapid development of the data layer using model structs.
  • Why ORMs are so hated?
    4 projects | /r/golang | 11 May 2023
    I have never hated gorm and it serves me well. However I tend to feed it raw SQL very often.
  • Golang RESTAPI boilerplate repository
    7 projects | /r/golang | 2 May 2023
    Array of values with embedded value all pointed to the last value, reflect code was broken: https://github.com/go-gorm/gorm/pull/5901 data corruption
  • Does Go, has something similar to Laravel eloquent (ORM) ?
    7 projects | /r/golang | 11 Apr 2023
    Yes. I think the most popular is gorm (https://gorm.io). I use it myself and love it, but i know that many people are against using it. For simple queries, the code is looking really clean. If you have complex queries with e.g. sub selects, your code looks like a car accident.
  • Tools besides Go for a newbie
    36 projects | /r/golang | 26 Mar 2023
    IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here

bun

Posts with mentions or reviews of bun. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-02.
  • Bun - The One Tool for All Your JavaScript/Typescript Project's Needs?
    4 projects | dev.to | 2 Apr 2024
    Let’s say you are interested in learning more about Bun and probably give it a try. Bun has a website, where you can learn more about Bun and its features (including all the benchmark data captured in this issue), and here is the link.
  • Bun 1.1
    17 projects | news.ycombinator.com | 1 Apr 2024
    I found Bun to be faster. Monorepo support is a bit kludgy though. Once you know of the workarounds, it's ok. See my comment on https://github.com/oven-sh/bun/issues/5413#issuecomment-1956...

    AFAIK, Pnpm monorepos do not follow standard npm. Bun does follow standard npm monorepos.

    17 projects | news.ycombinator.com | 1 Apr 2024
    I was quite curious about the .bunx file format. I think this could be a quite a useful thing, a universal binary format. Some tech companies have internal implementations of this sort of system. Then I see the shim DLL:

    https://github.com/oven-sh/bun/blob/801e475c72b3573a91e0fb4c...

    Even before this past week's XZ backdoor revelation, checking binaries into source control rather than building from source seems quite questionable. In fairness to the Bun developer's, they have a comment in their build.zig file acknowledging that this shim should be built more normally rather than being checked in.

    Then I look into the source for it:

    https://github.com/oven-sh/bun/blob/801e475c72b3573a91e0fb4c...

    For no discernible reason, it is using a bunch of undocumented Windows APIs. The source cites this Zig issue as one reason for why they think it is OK to use undocumented APIs:

    https://github.com/ziglang/zig/issues/1840

    I don't see any good reasons here cited for using undocumented, unstable interfaces. For Zig's part, there seems to be some poorly-explained interest in linking against "lower level" libraries without any motivating use case (just some hand waving about security and drivers, neither of which makes much sense. Onecore.lib is a thing if you wanted a documented way of linking an executable that run on a diverse set of Windows form factors. And compiling drivers may as well be treated as a seperate target, since function names are different). For Bun, I assume they are trying to have low binary size. But targeting NTDLL vs. Kernel32 should not make a big difference, especially when the shim is just doing basic file IO. For an example of making small executable with standard API, you can make hello world 4kb using MSVC just by using /NODEFAULTLIB and /ENTRY:main with link.exe and this program :

        #include 
    17 projects | news.ycombinator.com | 1 Apr 2024
    Kind of. When you do try to run bun in production you'll find out that it has significant differences to node -- like not handling uncaught exceptions: https://github.com/oven-sh/bun/issues/429

    Then you'll use bun build and run node in production, only to find that sourcemaps don't actually work at all: https://github.com/oven-sh/bun/issues/7427

    So you'll switch to esbuild + node in production :)

    Definitely excited for the promise of bun, but it's not quite baked yet.

    17 projects | news.ycombinator.com | 1 Apr 2024
    Looks like it, it seems the 2% are mostly odd platform specific issues that the authors' did not deem very important (my assumption for the release happening anyway). AFAIK this[1] PR tries to fix them.

    [1]: https://github.com/oven-sh/bun/pull/9729

    17 projects | news.ycombinator.com | 1 Apr 2024
    Yeah I saw a Github discussion where he mentioned that the code for uploading telemetry data was disabled, but he also said he plans to re-enable that at some point: https://github.com/oven-sh/bun/discussions/2605

    Granted, this was a year ago, so the Bun team's plans might have changed.

    17 projects | news.ycombinator.com | 1 Apr 2024
    You can track the progress here: https://github.com/oven-sh/bun/issues/1825

    There's still a ways to go but folks are actively contributing.

  • I have created a small anti-depression script
    4 projects | dev.to | 5 Mar 2024
    Install Node.js (or Bun, or Deno, or whatever JS runtime you prefer) if it's not there
  • JSR: The JavaScript Registry
    9 projects | news.ycombinator.com | 1 Mar 2024
    I think maybe I was unclear. I'm talking about writing libraries that abstract across these differences and provide a single API, as sibling describes. I already know it's possible. I made a simple filesystem abstraction here[0] and a very simple HTTP library that uses it here[1]. They both work in Node/Deno and the browser. Unfortunately I ran into issues with Bun's slice implementation[2]. But I suspect there's a much better way of detecting and using the different backends.

    [0]: https://github.com/waygate-io/fs-js

    [1]: https://github.com/waygate-io/http-js

    [2]: https://github.com/oven-sh/bun/issues/7057

  • SelectorHound: The tool for Sniffing out CSS Selectors
    2 projects | dev.to | 29 Feb 2024
    For, for more speed (requires installing bun first):

What are some alternatives?

When comparing GORM and bun you can also consider the following projects:

ent - An entity framework for Go

Xorm

SQLBoiler - Generate a Go ORM tailored to your database schema.

go-pg - Golang ORM with focus on PostgreSQL features and performance

pgx - PostgreSQL driver and toolkit for Go

beego orm

vite - Next generation frontend tooling. It's fast!

sqlc - Generate type-safe code from SQL

gorp - Go Relational Persistence - an ORM-ish library for Go

prisma-client-go - Prisma Client Go is an auto-generated and fully type-safe database client

bun - SQL-first Golang ORM

xorm - xorm是一个简单而强大的Go语言ORM库,通过它可以使数据库操作非常简便。本库是基于原版xorm的定制增强版本,为xorm提供类似ibatis的配置文件及动态SQL支持,支持AcitveRecord操作