Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Link SQLite dynamically through cgo

95425af7072b041bff198499b9285ee2582283bc · Keenan Nemetz · 10d ago · parent 7defd797

Link SQLite dynamically through cgo

modernc.org/sqlite is a pure-Go translation of SQLite and the largest thing in
the binary: it is about 4 MB of the 23.1 MB the release flags produce, while the
cgo driver against the system library costs about 0.25 MB. With the same flags
the amd64 binary drops to 19.3 MB (16% smaller), the .deb from 18.1 MB to 8.0 MB,
and the cgo driver is also faster on database-heavy paths: the repository index,
sessions, and the CI run store.

The trade is that the binary is no longer self-contained. It needs
libsqlite3.so.0 at runtime, so the .deb depends on libsqlite3-0 and the .rpm on
sqlite-libs, and building needs a C compiler and the SQLite development headers.
arm64 is still cross-compiled on the amd64 release image, with
gcc-aarch64-linux-gnu and libsqlite3-dev:arm64 installed beside the amd64 ones;
both architectures still build byte for byte from the same tag.

The DSNs carried modernc-only pragma parameters. mattn/go-sqlite3 spells them
_busy_timeout, _journal_mode, and _foreign_keys, and the driver is sqlite3, so
the connections keep the busy timeout, WAL mode, immediate write transactions,
and foreign keys they had before. The release image also defines the ci user the
verify image already has, so the release test step runs ssh as the host's uid
when the workflow is reproduced locally.

docs/getting-started.md +6−2

@@ -8,6 +8,10 @@ to configure. You can have a working forge in a few minutes.
8 8
9 9 - Go 1.27.3 or newer, to build Vole. `go.mod` pins that toolchain, so an older
10 10 `go` on `PATH` fetches it on the first build instead of failing.
11 - A C compiler and the SQLite development headers: `libsqlite3-dev` on Debian and
12 Ubuntu, `sqlite-devel` on Fedora and RHEL. Vole links SQLite dynamically, so
13 the binary needs `libsqlite3.so.0` on the machine that runs it; the packages
14 install it for you.
11 15 - Git.
12 16 - An SSH key. Vole uses the key to recognize you when you push. If you already use
13 17 GitHub or another forge with SSH, you can reuse that key.
@@ -20,13 +24,13 @@ From a source checkout:
20 24 ```sh
21 25 git clone <repository-url>
22 26 cd vole
23 go build -o vole ./cmd/vole
27 go build -tags libsqlite3 -o vole ./cmd/vole
24 28 ```
25 29
26 30 Or build it directly:
27 31
28 32 ```sh
29 go build -o vole github.com/rodent-software/vole/cmd/vole
33 go build -tags libsqlite3 -o vole github.com/rodent-software/vole/cmd/vole
30 34 ```
31 35
32 36 ## Create an instance