Compare glebarez/sqlite with the standard GORM SQLite driver
masterThe primary difference is that the standard go-gorm/sqlite driver relies on go-sqlite3, which requires CGO. This imposes several constraints that glebarez/sqlite avoids:
- No C Compiler Required: You don't need
gccinstalled to build or run your code. - Easier Containerization: You can build in tiny, stripped-down containers like
golang-alpinewithout installing build tools. - Cloud Compatibility: Works on platforms like Google Cloud Platform (GCP) that may restrict
gccexecution. - Simplified Feature Management: You don't need to manage complex build tags for SQLite features like JSON support.
Note on Performance: Because this is a pure-Go implementation, it is generally slower than the CGO-based implementation, though the performance gap is not considered extreme.