[GH-ISSUE #488] migrate to modernc.org/sqlite #373

Closed
opened 2026-05-07 00:23:37 +02:00 by BreizhHardware · 4 comments

Originally created by @sbinet on GitHub (Nov 12, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/488

hi there,

any reason why ntfy doesn't use modernc.org/sqlite which is a pure-Go implementation of sqlite3 ?
this would ease the cross-compilation story (ex: amd64 -> arm64) and make the binary pure-Go (and more easily statically compiled)

Originally created by @sbinet on GitHub (Nov 12, 2022). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/488 hi there, any reason why `ntfy` doesn't use [modernc.org/sqlite](https://modernc.org/sqlite) which is a pure-Go implementation of `sqlite3` ? this would ease the cross-compilation story (ex: amd64 -> arm64) and make the binary pure-Go (and more easily statically compiled)
BreizhHardware 2026-05-07 00:23:37 +02:00
Author
Owner

@binwiederhier commented on GitHub (Nov 12, 2022):

This is certainly intriguing. Do you have any information around the maturity, compatibility or the performance of this implementation?

Specifically

  • Is armv6, armv7 and arm64 supported?
  • Is WAL mode supported?
  • How mature/stable is the implementation?
<!-- gh-comment-id:1312555099 --> @binwiederhier commented on GitHub (Nov 12, 2022): This is certainly intriguing. Do you have any information around the maturity, compatibility or the performance of this implementation? Specifically - Is armv6, armv7 and arm64 supported? - Is WAL mode supported? - How mature/stable is the implementation?
Author
Owner

@sbinet commented on GitHub (Nov 12, 2022):

AFAIK, it's a mechanically translated C-to-Go version from the official sqlite3 project.

as for the architectures supported:

I don't have performances numbers wrt mattn/go-sqlite3.
perkeep has switched to modernc.org/sqlite some time ago.

are there tests in ntfy that exercize WAL ?
(running go test ./... fails for me, with and w/o modernc.org/sqlite)

<!-- gh-comment-id:1312562955 --> @sbinet commented on GitHub (Nov 12, 2022): AFAIK, it's a mechanically translated C-to-Go version from the official sqlite3 project. as for the architectures supported: - https://pkg.go.dev/modernc.org/sqlite#hdr-Supported_platforms_and_architectures I don't have performances numbers _wrt_ `mattn/go-sqlite3`. [perkeep](https://perkeep.org) has switched to `modernc.org/sqlite` some time ago. are there tests in `ntfy` that exercize WAL ? (running `go test ./...` fails for me, with and w/o `modernc.org/sqlite`)
Author
Owner

@binwiederhier commented on GitHub (Nov 13, 2022):

AFAIK, it's a mechanically translated C-to-Go version from the official sqlite3 project.

Fascinating. But also terrifying.

are there tests in ntfy that exercize WAL ?

There are no tests that use the WAL. In fact, it's not used by default at all. But it can be enabled like this: https://ntfy.sh/docs/config/#wal-for-message-cache (which is done for ntfy.sh to speed up cache writes).

(running go test ./... fails for me, with and w/o modernc.org/sqlite)

Can you share what fails? Maybe use the make test target (though that's almost the same)

<!-- gh-comment-id:1312708647 --> @binwiederhier commented on GitHub (Nov 13, 2022): > AFAIK, it's a mechanically translated C-to-Go version from the official sqlite3 project. Fascinating. But also terrifying. > are there tests in `ntfy` that exercize WAL ? There are no tests that use the WAL. In fact, it's not used by default at all. But it can be enabled like this: https://ntfy.sh/docs/config/#wal-for-message-cache (which is done for ntfy.sh to speed up cache writes). > (running `go test ./...` fails for me, with and w/o `modernc.org/sqlite`) Can you share what fails? Maybe use the `make test` target (though that's almost the same)
Author
Owner

@binwiederhier commented on GitHub (Nov 16, 2022):

Given my recent issues with SQLite (see #498), I think I'll still with the real deal for now.
I'll definitely keep this in mind. It would make things much easier indeed.

Let me know if you get it to compile.

<!-- gh-comment-id:1316233398 --> @binwiederhier commented on GitHub (Nov 16, 2022): Given my recent issues with SQLite (see #498), I think I'll still with the real deal for now. I'll definitely keep this in mind. It would make things much easier indeed. Let me know if you get it to compile.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#373
No description provided.