go-sqlite3

Languages and libraries

database driver library

SHOW HN2023

go-sqlite3

My Go SQLite driver did poorly on a benchmark, so I fixed it

github.com

#go sqlite driver#sqlite wasm#go no cgo#wazero

234points
58comments
#220of 3,109 in 2023
Top 8%of 2023 by points

How HN took it

DebatedReal support and real criticism

6 positive, 6 neutral or asking, 0 mixed, 5 critical, out of 17 comments about the project. Thread score +0.06.

Docs: 2 for, 3 againstExecution: 2 for, 1 againstIdea: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Good portability and no-CGO cross compilation.

    From 2 comments
    • The major one is (cross) compilation and portability. You can (e.g.) easily whip up a small CLI that embeds an SQLite database in the binary [1], cross compile this to all the…
      ncruces on HN
    • To compile C for a given platform, you need a C compiler for that platform. Which definitely exists but you may not have it at hand. To cross compile from your platform A to that…
      ncruces on HN
  • Polished project and fix explanation appreciated.

    From 1 comment
    • Hey, that's awesome. I think if I wanted a CGo-less solution, I would've probably picked the modernc variation, but honestly this looks very polished + the modernc version is…
      jchw on HN

Objections

  • README is hard to understand for newcomers.

    From 2 comments
    • Basically a throwaway comment that is somewhat off topic, but your current Github README is very "inside baseball." I think it would be worth a one-sentence introduction to what…
      carbocation on HN
    • Agree, 4. Someone following a link from HN I'm often confused when clicking through from HN and can't figure out from the website or README what the project is doing.
      KingOfCoders on HN
  • Unclear why WASM beats native C SQLite.

    From 2 comments
    • I'd like to read what the actual benefits of not linking to C sqlite implementation are. I can imagine using wazero.io for libraries, but I fail to understand _why_ would anybody…
      acqq on HN
    • I'm still missing some details to understand that story, as I don't believe that there is any platform that Go supports on which C sqlite would not run, more the opposite, the…
      acqq on HN

Requests

  • Include benchmarks in the repo to prevent regressions.

    From 1 comment
    • Hey, that's awesome. I think if I wanted a CGo-less solution, I would've probably picked the modernc variation, but honestly this looks very polished + the modernc version is…
      jchw on HN
  • Explain the performance fix in more detail.

    From 1 comment
    • Hey, that's awesome. I think if I wanted a CGo-less solution, I would've probably picked the modernc variation, but honestly this looks very polished + the modernc version is…
      jchw on HN

Questions

  • Is there a strategy to prevent future performance regressions?

    From 1 comment
    • Hey, that's awesome. I think if I wanted a CGo-less solution, I would've probably picked the modernc variation, but honestly this looks very polished + the modernc version is…
      jchw on HN
  • Can it support vector search via sqlite-vss?

    From 1 comment
    • Very cool! I’ve been looking at using SQLite-vss for fast vector sorting, but it requires CGO. I imagine if I do WASM compilation directly from C, I might be able to get around…
      koeng on HN

Alternatives named

  • mattn go-sqlite3 (CGO)

    From 1 comment
    • I use the Mattn library. I don't care as much about not having Cho in my program. Sqlite project uses c and they have rigourous testing for each release. With a driver written in…
      willi59549879 on HN
  • modernc sqlite

    From 1 comment
    • Hey, that's awesome. I think if I wanted a CGo-less solution, I would've probably picked the modernc variation, but honestly this looks very polished + the modernc version is…
      jchw on HN
  • zombiezen and crawshaw drivers

    From 1 comment
    • Can someone explain what is the essential, practical difference between a library that implements package database/sql (such as mattn's) and one that does not (such as zombiezen…
      euroderf on HN
  • sqinn-go

    From 1 comment
    • Note that Squinn is not "native go" or "go only", but the owner insists on misleading people: https://github.com/cvilsmeier/sqinn-go/issues/8
      38 on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/38650570)