Documentation
¶
Overview ¶
Command fetch-lance-c-release acquires the pinned lance-c shared library and header from the official GitHub release for one target.
It downloads the archive for the target triple named after the pinned release, verifies it against the checksum published with the release, extracts only the header and shared library, and verifies that the header bytes match the pin in internal/ffi/upstream.go and that the library's object format and machine match the requested target. It never builds lance-c from source, and it never substitutes a different release or target.
Usage:
go run ./internal/tools/fetch-lance-c-release \ -target linux/amd64 \ -out /tmp/lance-c-release
Extraction uses in-process xz and tar readers, so acquisition does not depend on the platform tar implementation.
The output directory must not exist. The command writes:
acquisition.txt verified provenance for the rest of the lane lance-c-<tag>-<triple>.tar.xz the verified published archive ...tar.xz.sha256 the published per-asset checksum include/lance/lance.h canonical header (LF line endings) lib/<library> the published shared library, byte for byte
Linux and macOS archives ship an LF header; the Windows archive ships the same header with CRLF line endings. The command writes the canonical LF form recorded by upstreamHeaderSHA256 and records both hashes.
When the published artifact module that this target's generated selector imports records the same upstream repository, commit, and header as the pin, the acquired library must also equal that module's UncompressedSHA256. That check keeps CI on the bytes the published module ships even if a release archive and its published checksum were replaced together: the module is an immutable version resolved through the Go proxy and checksum database, not bytes published with the archive. A pin bump whose modules have not been republished yet records the independent check as inactive; candidate packaging still uses the acquired bytes.
lance-c reports its binding release through lance_c_version(), but that string cannot prove the commit that built the library bytes. The published per-asset checksum, the adopted module identity, the pinned header hash, and the target machine check are the available identity chain.