microsoft / microsoft/onnxruntime
[Feature Request] [Go] Tag the module and document native runtime setup
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
### Describe the feature request
Pull request [#29615](https://github.com/microsoft/onnxruntime/pull/29615) added the official Go module at `github.com/microsoft/onnxruntime/go`.
Please publish a tagged version and document how to use it with a released native ONNX Runtime archive.
Current gaps:
- `go list -m -versions github.com/microsoft/onnxruntime/go` returns no versions. `@main` resolves only to a pseudo-version.
- The module is in the `go` subdirectory, so its version tag needs the [`go/` directory prefix](https://go.dev/doc/modules/managing-source#multiple-module-source).
- The [package documentation](https://github.com/microsoft/onnxruntime/blob/main/go/onnxruntime/doc.go) tells users to call `SetSharedLibraryPath`, but it does not identify a compatible release archive.
- The [ONNX Runtime install page](https://onnxruntime.ai/docs/install/) does not include Go.
- [Current Go CI](https://github.com/microsoft/onnxruntime/blob/main/.github/workflows/linux_ci.yml) enables binding tests only for the Linux x64 release job and [loads the library built by that job](https://github.com/microsoft/onnxruntime/blob/main/.github/workflows/reusable_linux_build.yml). It does not test released archives.
Requested result:
1. Publish a valid `go/v...` tag so a versioned `go get github.com/microsoft/onnxruntime/go/onnxruntime@...` works.
2. Document the version relationship between the Go module and ONNX Runtime. State the minimum compatible runtime version.
3. Document build requirements (currently [Go 1.26](https://github.com/microsoft/onnxruntime/blob/main/go/go.mod), CGO, and a C compiler). For each supported target, identify the release archive, checksum, library path, load method, and external execution-provider dependencies.
4. Test the tagged binding with the matching release archives on the supported platform set.
Current ONNX Runtime release archives and their GitHub SHA-256 digests can satisfy this request. It does not require a combined multi-platform Go module, a new archive format, or an automatic downloader.
### Describe scenario use case
[Seek](https://github.com/dualeai/seek) uses ONNX Runtime for local INT8 reranking on Linux and macOS, on `amd64` and `arm64`.
Seek now uses `github.com/yalue/onnxruntime_go`. It [embeds one compressed runtime per target](https://github.com/dualeai/seek/blob/develop/cmd/seek/rerank_backend_assets_linux_amd64.go) and keeps a [version and SHA-256 manifest](https://github.com/dualeai/seek/blob/develop/cmd/seek/rerank_assets_linux_amd64/runtime.json) for each target.
A tagged official module and a documented runtime mapping would let Seek evaluate a migration without defining a separate binding-to-runtime compatibility policy. Other Go services and command-line tools would get the same benefit.
Contributor guide
Research direction
Start with go/go.mod and go/onnxruntime/doc.go, then review the install page and the Linux CI workflows linked in the issue. Verify how module tags, native release archives, and binding tests currently relate across supported targets. Done means a go/v... tag exists, the module-to-runtime requirements and setup are documented, and tagged bindings are tested against matching release archives.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ci-cd, documentation, release, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100