Artifact 41fc170a2d1f0283355d83640217db708ca8f7e4d8ba18a8b91db95ed79ff9b8:
- File
db/config_wasm.go
— part of check-in
[f5744359d3]
at
2026-04-19 16:30:54
on branch trunk
— Initial open source release
libfossil is a pure-Go implementation of the Fossil SCM, reading and writing the same .fossil SQLite repository format as upstream Fossil.
This is the first public release of code that previously lived in a private repository. The module path is github.com/danmestas/libfossil and the binary is named libfossil to avoid $PATH collisions with upstream fossil.
Included: - Repo lifecycle (create, clone), checkout/checkin, timeline, merge, diff, annotate, shun, tag, branch, bisect, stash, undo/redo - Sync-over-HTTP protocol (client and handler) - Two SQLite drivers: modernc (pure Go, default) and ncruces (wasm-capable) - Observer interfaces (SyncObserver, CheckoutObserver) with an optional OpenTelemetry implementation in observer/otel (separate submodule) - Deterministic simulation testing harness with BUGGIFY fault injection - Kong-based embeddable CLI under cli/ and a standalone binary under cmd/libfossil/ (user: [email protected], size: 726) [annotate] [blame] [check-ins using]
//go:build wasip1 || js package db // wasmPragmaOverrides returns browser/WASI-specific pragma overrides. // OPFS doesn't support shared memory, so WAL is replaced with DELETE journal // and EXCLUSIVE locking mode (single connection per Worker). func wasmPragmaOverrides() map[string]string { return map[string]string{ "journal_mode": "DELETE", "locking_mode": "EXCLUSIVE", } } // wasmDSNSuffix appends nolock=1 to disable file locking on WASM. // WASI runtimes don't support POSIX/OFD/BSD file locks. func wasmDSNSuffix() string { return "nolock=1" } // wasmClearPragmas signals that WASM builds should not skip pragmas — // browser builds need DELETE journal + EXCLUSIVE locking. const wasmClearPragmas = false