Skip to content

feat(go): add SDK with release-downloaded native bindings - #501

Open
anirudh-makuluri wants to merge 15 commits into
usemoss:mainfrom
anirudh-makuluri:feat/go-sdk-prebuilt-bindings
Open

feat(go): add SDK with release-downloaded native bindings#501
anirudh-makuluri wants to merge 15 commits into
usemoss:mainfrom
anirudh-makuluri:feat/go-sdk-prebuilt-bindings

Conversation

@anirudh-makuluri

@anirudh-makuluri anirudh-makuluri commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the public Go SDK and CGO bindings for the Moss C runtime
  • download checksum-verified, platform-specific native archives from the existing c-sdk-v0.9.0 GitHub Release instead of committing static libraries
  • use an explicit --vendor opt-in when a consumer needs the installer to regenerate vendor/
  • add Go SDK test and source-only module publishing workflows, plus installation and release documentation

Consumer flow

After your application imports the SDK:

go get github.com/usemoss/moss/sdks/go/sdk
go run github.com/usemoss/moss/sdks/go/tools/install@latest --vendor
go build .

Use --vendor only when you allow the installer to run go mod vendor; if the project already contains writable vendored Moss bindings, omit it.

After merge, run Publish Go SDK with v0.1.2 to publish matching sdks/go/{bindings,sdk,tools/install}/v0.1.2 tags from usemoss/moss. Fork-only tags cannot satisfy the canonical module path.

Validation

  • go test ./... and go vet ./... for the installer
  • CGO_ENABLED=0 go test ./... in sdks/go/sdk
  • go run ./tools/install --release c-sdk-v0.9.0 in sdks/go
  • CGO_ENABLED=1 go build -v . in sdks/go/bindings and sdks/go/sdk
  • external-consumer install/link test using the explicit --vendor flow

Pull Request Checklist

  • I have read the CONTRIBUTING guide.
  • I have updated the documentation.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have added tests that prove the archive-path safety check.
  • New and existing unit tests pass locally with my changes.

Type of Change

  • New feature
  • This change requires a documentation update

anirudh-makuluri and others added 7 commits July 29, 2026 14:21
Publish per-platform Go modules from C SDK releases so consumers can
go get the SDK without manual libmoss setup, build tags, or LD_LIBRARY_PATH.

Co-authored-by: Cursor <cursoragent@cursor.com>
Large monolithic native-lib commits exceed GitHub HTTP push limits.
Publish each platform lib module tag separately before bindings/sdk tags.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace per-platform Go submodules (which hit GitHub's 100MB file limit)
with a source-only distribution model. Consumers run tools/install or
go generate to fetch libmoss.a from C SDK GitHub Releases with checksum
verification.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the bindings package directory with go list so installs land in
the vendored module tree. Fall back to ~/.cache/moss-go when the module
cache is read-only and print CGO_LDFLAGS for that case.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codex review

No issues found.

Comment thread .github/workflows/publish-go-sdk.yml Outdated
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread sdks/go/bindings/prebuilt_windows_amd64.go Outdated
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread sdks/go/bindings/libmoss.go Outdated
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread sdks/go/bindings/prebuilt_windows_amd64.go Outdated
Comment thread .github/workflows/publish-go-sdk.yml Outdated
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread .github/workflows/publish-go-sdk.yml
Comment thread sdks/go/scripts/publish-sdk-module-tags.sh Outdated
Comment thread sdks/go/sdk/go.mod
Comment thread sdks/go/tools/install/main.go Outdated
Comment thread .github/workflows/go-sdk-test.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant