Skip to content

refactor!: remove Go SDK (closes #481)#486

Merged
userFRM merged 3 commits into
mainfrom
feat/481-remove-go-sdk
May 6, 2026
Merged

refactor!: remove Go SDK (closes #481)#486
userFRM merged 3 commits into
mainfrom
feat/481-remove-go-sdk

Conversation

@userFRM
Copy link
Copy Markdown
Owner

@userFRM userFRM commented May 6, 2026

Summary

Removes the Go SDK entirely. The cgo bridge between Rust's C ABI and Go's runtime carries per-call overhead that masks the upstream throughput this SDK is engineered for. Users who need Go bindings can build their own cgo wrapper against the unchanged C ABI in crates/ffi/ — header at sdks/cpp/include/thetadx.h, all FFI types and free fns exported as tdx_* symbols.

What was deleted

Surface Count
sdks/go/ source files 30
crates/thetadatadx/build_support/ Go modules + templates 18 (5 .rs, 13 .tmpl)
tick_schema.toml Go-prefixed render rows (go_struct, go_converter) 32
sdk_surface.toml Go target entries (go_fpss, go) 23 method/utility targets + the entire [[go_ffi.tls_reader_markers]] block (5 entries)
CI workflow jobs / steps removed live.yml: 3 cgo blocks + 3 setup-go setups; ci.yml: setup-go setups + the go test ./... block in sdk-bindings
dependabot.yml Go module entry 1
.gitattributes sdks/go/ rules 10
Tracked *_go*.rs source files 0 remaining

Net change: 113 files touched, ~310 insertions, ~11,777 deletions.

The shared (size, align, offset) math previously living in ticks/go.rs (used by the C++ static-assert emitter and tdbe layout-guard emitter) was extracted into a neutral crates/thetadatadx/build_support/ticks/layout.rs module — neither emitter is Go-specific, the helper just happened to live there for historical reasons.

Supported integration path going forward

The C ABI in crates/ffi/ is unchanged. Third-party cgo / Swift / Zig / Nim / etc. wrappers continue to work against the same extern "C" surface. Header at sdks/cpp/include/thetadx.h. The TypeScript and Python SDKs continue to ship as pre-built binaries (napi-rs and PyO3 abi3).

Validation

Local CI gate (all clean):

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo deny check — advisories, bans, licenses, sources all ok
  • cargo run -p thetadatadx --bin generate_sdk_surfaces --features config-file -- --check — no drift
  • cargo check --manifest-path tools/mcp/Cargo.toml --locked
  • cargo clippy --manifest-path tools/mcp/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path tools/mcp/Cargo.toml --no-run
  • cargo check --manifest-path tools/server/Cargo.toml --locked
  • cargo check --manifest-path sdks/python/Cargo.toml --locked
  • cargo check --manifest-path sdks/typescript/Cargo.toml --locked

Test plan

  • Confirm the Surfaces job is green on CI (it now skips the Go bindings step entirely).
  • Confirm SDK Bindings job still builds the C++ artifact across Linux / macOS / Windows from the FFI artifact.
  • Spot-check the regenerated frames_generated.rs, tick_classes.rs (Python + TS), and fpss_event_structs.h.inc (C++) — their content must come from the SSOT only.

Closes #481.

The cgo bridge between Rust's C ABI and Go's runtime carries
per-call overhead that masks the upstream throughput this SDK is
engineered for. Users who need Go bindings can build their own cgo
wrapper against the unchanged C ABI in `crates/ffi/` — header at
`sdks/cpp/include/thetadx.h`, all FFI types and free fns exported as
`tdx_*` symbols.

Removes:

- `sdks/go/` (entire directory: 30 source files)
- Per-Go build_support modules + templates: `ticks/go.rs`,
  `fpss_events/go_structs.rs`, `sdk_surface/go.rs`,
  `endpoints/render/go.rs`, `endpoints/render/go_validate.rs`, all
  `templates/go/`, `templates/validate_go/`, `templates/go_structs/`
- Go-specific `tick_schema.toml` render rows (`go_struct`,
  `go_converter`) on every `[types.X.render]` block
- Go-specific `sdk_surface.toml` targets (`go_fpss`, `go`) and the
  entire `[[go_ffi.tls_reader_markers]]` SSOT block
- `MethodTarget::GoFpss`, `UtilityTarget::Go`, `GoFfiSpec`,
  `TlsReaderMarker`, plus every Go-only helper in
  `endpoints/helpers.rs` and `sdk_surface/common.rs`
- CI Go SDK jobs in `ci.yml` and `live.yml` (`actions/setup-go`,
  cgo wrapper steps), Go module from `dependabot.yml`, and the
  `sdks/go/` rules in `.gitattributes`

Extracts shared `(size, align, offset)` math used by the C++ and
tdbe layout-assert emitters into a neutral `ticks/layout.rs` module.

Refreshes README, CONTRIBUTING, ROADMAP, the docs-site, and the
in-repo `docs/` tree. Mirrors `CHANGELOG.md` -> `docs-site/docs/changelog.md`.

The C ABI in `crates/ffi/` is unchanged — third-party cgo / Swift /
Zig wrappers continue to work against the same `extern "C"` surface.

Closes #481.
@userFRM userFRM force-pushed the feat/481-remove-go-sdk branch from c9cafdd to 0671c4e Compare May 6, 2026 09:41
userFRM added 2 commits May 6, 2026 11:53
The script asserted `sdks/README.md` contains a sentence about Windows
being validated with the GNU Rust target — that sentence lived inside a
Go SDK bullet (cgo links through MinGW). Go SDK removed in this PR;
sentence removed from the README; the assertion is now stale and the
\`Extended Surfaces\` CI gate fails on it.

Drop the assertion. C++ and Python/TS Windows validation is already
documented in the surviving bullets.
The agreement-test fixtures wrote artifacts under producer key "go",
but `scripts/validate_agreement.py::LANGS` only reads python/cli/cpp
after the Go SDK removal. The disagreement-detection tests therefore
silently passed (the diff engine ignored the "go" artifact carrying
the disagreement).

Bulk-replace "go" -> "cli" for inert fixture rows; rewrite the two
disagreement-anchor tests so the disagreeing artifact is written by a
producer the loop does not subsequently overwrite. 29/29 tests pass.
@userFRM userFRM merged commit f3e1e18 into main May 6, 2026
32 checks passed
@userFRM userFRM deleted the feat/481-remove-go-sdk branch May 6, 2026 10:25
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.

Remove Go SDK

1 participant