This repo packages the kernel's prebuilt per-platform C-ABI archives as Go
modules. A release wraps a specific databricks-sql-kernel version and is
versioned to match it — bindings vX.Y.Z is built from kernel tag vX.Y.Z.
The C-ABI/behaviour changes for a release are the kernel's (see the kernel
CHANGELOG.md);
this repo only packages the archives + records binding-repo notes in
CHANGELOG.md.
A kernel opt-in build links three things that MUST come from one kernel commit:
- The archives here —
lib/<platform>/libdatabricks_sql_kernel.a, built from kernelvX.Y.Z. - The committed C header — the driver commits
databricks_kernel.hatinternal/backend/kernel/include/(its cgo layer#includes it), synced to the same kernelvX.Y.Z. It is not committed in this repo: the bindings modules carry only the archive +#cgo LDFLAGS, so nothing here compiles against the header. - The driver's pin —
databricks-sql-gorequires the fivelib/<platform>modules atvX.Y.Zin itsgo.mod, and records the kernel commit in itsKERNEL_REVfile. Upgrading the driver'sgo.modis what moves the kernel version for consumers.
If the header and the archive disagree (e.g. header declares a symbol the archive doesn't export), the driver fails to link — so never bump one without the others.
- Kernel tag. Confirm/cut
databricks-sql-kerneltagvX.Y.Z. The tagged commit MUST contain the committed C-ABI header (tags ≤v0.2.0predate it). - Build. Build the per-platform archives from the tagged kernel via
Databricks' internal release pipeline (Databricks maintainers: see the
release-kernel-bindingsrunbook). It security-scans the archives and produces akernel-go-bindings-vX.Y.Zartifact holding eachdist/<platform>/libdatabricks_sql_kernel.a. Windows archives use the GNU (-gnu/-gnullvm) triples — Go cgo links a GNU.a, never an MSVC.lib. - Stage. Download the artifact; copy each
dist/<platform>/libdatabricks_sql_kernel.aintolib/<platform>/. (The artifact also containsdatabricks_kernel.h, but this repo does not commit it — the driver syncs the header into its own tree from the kernel atKERNEL_REV.) - Changelog. Add a
## [vX.Y.Z]entry toCHANGELOG.md(kernel rev, platforms, any packaging/link notes). - Commit + tag. Commit, then push the path-prefixed module tags plus the
root tag, all at that commit:
for p in linux_amd64 linux_arm64 linux_arm darwin_amd64 darwin_arm64 windows_amd64 windows_arm64; do git tag "lib/$p/vX.Y.Z" done git tag "vX.Y.Z" git push origin main --tags
- Driver. In
databricks-sql-go, bump thego.modrequires tovX.Y.Z, refreshgo.sum, setKERNEL_REVto thevX.Y.Zcommit, and sync the committed header (internal/backend/kernel/include/). Databricks maintainers: see therelease-kernel-bindingsrunbook for the full driver-side flow.
Go module versions are immutable once the public proxy / checksum database has served them — never move a released tag; always cut a new version. (A brand-new module path may take its first tag at an existing version, since that path was never published — that's how a new platform can be added at the current version without re-tagging the others.)
Create lib/<os>_<arch>/ with its own go.mod, a build-tag-gated prebuilt.go
(matching //go:build + #cgo LDFLAGS), and the committed archive; add a root
prebuilt_<os>_<arch>.go shim; add the platform to the release workflow's build
matrix and to the driver's go.mod + cgo_<os>_<arch>.go shim; tag it alongside
the others.