Skip to content

h3-go v0.3.0 — H3 Core v4.4.0

Choose a tag to compare

@dimchansky dimchansky released this 15 Jul 14:32
· 21 commits to master since this release
Immutable release. Only release title and notes can be modified.

Library version: v0.3.0
Behavioral compatibility target: H3 Core v4.4.0

Feature release and first public release of h3-go — a pure-Go,
dependency-free port of Uber's H3 grid system
(all 78 public functions of H3 C v4.4.0 behind a typed Go API), plus the
upstream-compatible h3 CLI.

Upstream H3 changes adopted

None — the behavioral target is unchanged at H3 C v4.4.0. The v0.2.0
sync's missed upstream test delta is now closed (ported
testConstructCell.c and testIndexDigits.c plus additions to five
suites); the full symbol-level audit is
docs/sync/4.3.0-to-4.4.0.md.

Go API changes

All additive — no breaking changes:

  • Zero-allocation Cell.AppendVertexes(dst []Vertex); Cell.Vertexes now
    delegates to it with an identical allocation profile (verified within
    noise by an interleaved benchmark comparison).
  • Generic typed IsValidIndex; DirectedEdge.IndexDigit;
    Vertex.IndexDigit; Cell.ImmediateParent; Cell.ImmediateChildren;
    zero-allocation Cell.AppendImmediateChildren;
    Cell.GridDiskDistancesGrouped; NumIcosahedronFaces.

Fixed

  • Closed the 4.4.0 upstream test-porting gap left by the v0.2.0 sync (see
    above).
  • Linux parity build fixes and platform-deterministic parity tests that
    avoid C undefined behavior (gridRing(k<0), clz(0)) — the gridRing
    negative-k UB is an upstream-reportable finding of this project's parity
    suite.

Compatibility and migration

  • No breaking Go API changes. Requires Go ≥ 1.24.
  • Migrating from the official cgo binding:
    docs/migration-from-uber-h3-go.md
    (all 78 operations classified; the before/after example is kept
    compiling by a test).
  • Known limitations: the documented intentional deviations from H3 C
    (docs/DEVIATIONS.md);
    H3 C 4.5.x is not yet adopted (upstream comparison:
    docs/comparison-uber-h3-go.md).
  • go.mod now retracts the stale 2019 pseudo-version
    v0.0.0-20191115084349-4ab39a97d2af — a pre-rewrite codebase previously
    cached by the Go module proxy and unrelated to this line; go tooling
    will warn anyone still pinned to it.

Validation

Run on the exact released commit (tag-triggered
Nightly release gate):
the full C parity suite against pristine upstream sources; the complete
upstream fixture replay; the CLI differential suite against the compiled C
CLI; the race detector; a fuzz smoke over six of the seven fuzz targets —
FuzzUpstreamPolygonOperations remains seed-corpus-only because fuzzing
surfaced a confirmed finite ~15 s adversarial polygon input (parity of
this pathology with the C implementation has not yet been established;
reproducer and investigation:
issue #3); the uber/h3-go
differential and semantic-equivalence suites; govulncheck v1.6.0 (root
module ./...; the test-only interop/ modules are intentionally out of
scope — they never reach consumers); and a digest-pinned gitleaks v8.30.1
full-history secret scan — zero findings, run:
https://github.com/dimchansky/h3-go/actions/runs/29422327309.
Counts (parity files, fixture records, CLI scenarios) are recorded in the
tag-pinned generated inventories under
docs/.

CLI artifacts

Six archives + SHA256SUMS, built bit-reproducibly with go1.26.5
(CGO_ENABLED=0, -trimpath, normalized archive metadata via
tools/releasepack) — verified by an independent CI rebuild and an
independent local rebuild, all byte-identical. Reproduce from the tag:

git checkout v0.3.0 && GOTOOLCHAIN=go1.26.5 make release-dist VERSION=v0.3.0 OUT=$(mktemp -d)

Runtime-tested on architecture-proven runners: linux/amd64, windows/amd64,
darwin/arm64 (plus darwin/arm64 natively and linux/arm64 under emulation).
Cross-built only: darwin/amd64, windows/arm64.

Integrity: this Release is immutable (tag and assets locked at
publication, release attestation minted). sum.golang.org authenticates
the Go module source only — verify the one archive you downloaded against
SHA256SUMS (tokenless; run in the directory holding both files).

macOS:

archive=h3-v0.3.0-darwin-arm64.tar.gz   # darwin-amd64 on Intel Macs
actual=$(shasum -a 256 "$archive") &&
  grep -Fxq -- "$actual" SHA256SUMS &&
  echo "OK: checksum verified"

Linux:

archive=h3-v0.3.0-linux-amd64.tar.gz    # or linux-arm64
actual=$(sha256sum "$archive") &&
  grep -Fxq -- "$actual" SHA256SUMS &&
  echo "OK: checksum verified"

Windows (PowerShell):

$archive = "h3-v0.3.0-windows-amd64.zip"   # or windows-arm64
$entries = @(Select-String -Path SHA256SUMS -SimpleMatch $archive)
if ($entries.Count -ne 1) { throw "expected exactly 1 manifest entry for $archive, found $($entries.Count)" }
$hash = (Get-FileHash $archive -Algorithm SHA256).Hash.ToLower()
if ($entries[0].Line -ne "$hash  $archive") { throw "checksum mismatch for $archive" }
"OK: checksum verified"

The Unix commands are fail-closed: grep -Fxq requires an exact whole-line
fixed-string match, a missing archive stops the && chain at the checksum
tool itself, and OK: checksum verified prints only after success (any
failure exits non-zero without it); the PowerShell version fails explicitly
on zero/multiple manifest entries or a hash mismatch. The release pipeline
executes these exact commands — plus corrupted-archive and missing-archive
negative cases — on real macOS, Linux, and Windows runners for every tag.
Alternatively, verify cryptographically with
gh release verify v0.3.0 --repo dimchansky/h3-go and
gh release verify-asset v0.3.0 <file> --repo dimchansky/h3-go (requires
an authenticated GitHub CLI session).

macOS: the darwin binaries are ad-hoc linker-signed, but not Developer
ID-signed or notarized
, so Gatekeeper can reject browser-downloaded
copies. Verify the archive first (command above), extract, then remove
quarantine from the exact verified binary only —
xattr -d com.apple.quarantine h3-v0.3.0-darwin-arm64/h3 (substitute
darwin-amd64 on Intel Macs) — or use System Settings → Privacy &
Security → Open Anyway. go install github.com/dimchansky/h3-go/cmd/h3@v0.3.0
avoids quarantine entirely. Never disable Gatekeeper globally. Full steps
ship in the README inside each archive.