63345001917e6c6d18f5fc6348449a28eabf564c
The mount layer is no longer a stub. With `-tags fuse` on Linux,
SQLite (and any POSIX consumer) opens files directly on the
mountpoint — no intermediate copy. Default builds stay
dependency-light: bazil.org/fuse + bazil.org/fuse/fs are gated
behind the build tag.
What's new
----------
- pkg/mount/fuse_unix.go (`-tags fuse && linux`): full FS/Node/Handle
bridges. Maps every POSIX op the kernel sends:
Read → File.ReadAt
Write → File.WriteAt
Fsync → File.Sync (durable through age + backend)
Flush → File.Sync (close-time flush)
Release → File.Close
Setattr.Size → File.Truncate
Lookup → FS.Lookup
ReadDirAll → FS.ReadDir
Create → FS.Create + Open
Mkdir → FS.Mkdir
Remove → FS.Remove
Open(O_TRUNC) → File.Truncate(0)
- pkg/mount/fuse_stub.go: same Mount/MountWithVFSAdapter signatures
for the default no-fuse build; returns a build-tag error.
- pkg/mount/fuse_sqlite_test.go: gated by VFS_FUSE_E2E=1 +
`-tags fuse`. Mounts in tempdir, creates `test.db`, 100 INSERTs,
unmounts, remounts, runs PRAGMA integrity_check. Verifies the DB
survives the full encrypt → backend → decrypt round trip with
zero copy.
- cmd/vfs: mount subcommand wires through MountWithVFSAdapter.
CI
--
.github/workflows/build.yml runs three test passes on Ubuntu:
1. default `go test -race ./...`
2. `go vet -tags fuse ./...`
3. apt-get fuse + `VFS_FUSE_E2E=1 go test -race -tags fuse
-run TestFUSESQLite ./pkg/mount/ -v`
Caveats
-------
- macOS: bazil.org/fuse dropped macOS support upstream (commit
65cc252). 0.3.1 will add a parallel mount_darwin.go using
github.com/jacobsa/fuse so devs on macOS get the same e2e flow.
Until then, macOS devs use the in-process API + the SQLite
byte-roundtrip test in pkg/vfs/sqlite_test.go (already shipped).
- Local NVMe disk cache (write-back tier) lands in 0.4.0; today the
cache is in-memory LRU.
vfs
S3-backed virtual block filesystem with PQ encryption — unlimited write storage for stateful services.
Quick start
# Build
make build
# Generate an age key (one-time)
go run filippo.io/age/cmd/age-keygen > /tmp/vfs.key
RECIPIENT=$(grep 'public key' /tmp/vfs.key | cut -d: -f2 | tr -d ' ')
# Put + get a block (file:// backend, dev only)
echo "hello world" > /tmp/in.txt
ID=$(./bin/vfs put /tmp/in.txt --backend file:///tmp/vfs-store --age-recipient "$RECIPIENT" --age-key /tmp/vfs.key)
echo "block: $ID"
./bin/vfs get "$ID" --backend file:///tmp/vfs-store --age-key /tmp/vfs.key
# Same flow against S3
./bin/vfs put /tmp/in.txt \
--backend "s3://my-bucket/vfs-prefix?region=us-east-1" \
--age-recipient "$RECIPIENT" \
--age-key /tmp/vfs.key
What it is
A 4 KiB block-level virtual filesystem that:
- Hashes every block with blake3-256 for content addressability + integrity.
- Encrypts every block with luxfi/age (X25519, optionally hybrid PQ via ML-KEM-768) before it touches the backend.
- Stores blocks as
blocks/<2-hex-shard>/<full-hash>.zap.ageon a pluggable backend (file://,s3://,gcs://(TODO),azureblob://(TODO)). - Caches recently-used blocks in an in-memory LRU (NVMe write-back cache lands in 0.2.0).
- Mounts as a FUSE filesystem (
make build-fuse; mount layer lands in 0.2.0).
Why
Stateful services in K8s usually pre-size a PVC and either over-provision or run out of disk. vfs lets a service write as if it has unlimited local NVMe — the hot tier is a configurable local cache, the cold tier is S3 (or any object store), and the PQ-encrypted blocks let the operator put cold pages in any region without leaking content.
Companion to hanzo/replicate — replicate streams SQLite WAL frames file-level; vfs does block-level for any file system.
See LLM.md for the full architecture, K8s sidecar pattern, encryption design, and roadmap.
License
Apache 2.0
Languages
Go
97.8%
ZAP
1.2%
Makefile
0.6%
Dockerfile
0.4%