Limits and support
Platforms and current limitations
Check the released platform matrix, unsupported language shapes, and fail-closed ABI boundaries.Maintained byC2Go contributorsCompiler implementation coverage and published SDK coverage are different claims. Use the release asset list when selecting a supported host package.
Published SDK archives
The current coordinated release publishes and validates:
| Host | Architecture | Target triple |
|---|---|---|
| Linux | amd64 | x86_64-unknown-linux-goabi |
| Linux | arm64 | aarch64-unknown-linux-goabi |
| Windows | amd64 | x86_64-pc-windows-goabi |
| macOS | arm64 | aarch64-apple-darwin |
Each archive is native to its host. Generated output is also specific to (GOOS, GOARCH).
Additional code-generation paths
The compiler also contains a Darwin amd64 code-generation path. Windows arm64 is currently only an incomplete experimental path: a simple input can write a windows/arm64 manifest, but c2go_extern still reports that its calling convention is unsupported for that target. It is not a usable combination and has neither an SDK nor a complete release gate.
Boundary feature matrix
| Feature | Unix | Windows |
|---|---|---|
| Go calls: scalar, float, pointer | supported | supported |
| Export C functions and records | supported | supported |
| Native imports: scalar, pointer, float | supported | supported |
| Native imports: small records by value | supported within ABI limits | supported by Win64 size rules |
| Callback: scalar and pointer | supported | supported |
| Callback: float or double | supported | fail closed |
| Callback: selected small records | supported | fail closed |
| Multi-value return | supported for valid one-slot fields | supported for valid one-slot fields |
“Fail closed” means the toolchain rejects an unsupported shape instead of emitting a silently incorrect call.
Hard language limits
- C only and 64-bit only; C++ is rejected.
- Variable-length arrays and dynamic
allocaare rejected because movable Go stacks make their bases unsound. - Packed or custom-aligned managed records are warning-only and produce target-specific generated layouts; unmanaged records containing scanned data pointers reject those layouts outright.
c2go_ifaceis an ABI representation only; there is currently no C-side API for dynamic interface-method calls. Bind a named Go wrapper instead.c2go_variantcannot represent ambiguous overlapping managed pointers.c2go_returntypefields must each occupy one supported Go ABI result slot.- Callback operands must name C2Go functions; bare C2Go function pointers cannot be passed to native callback slots.
Release-candidate status
The current binaries are unsigned. The macOS archive is not notarized and the Windows executable is not Authenticode-signed. Go 1.25.x and 1.26.x are supported; Go 1.27 and later fail closed until the centralized provider validates them. Interfaces, manifest fields, and ABI epochs may change before 1.0.
When an unsupported shape appears, reduce it to a simpler boundary—for example, pass a pointer to explicitly owned storage instead of a large record by value—and add tests for every target you intend to ship.
The troubleshooting guide maps common diagnostics to the relevant stage.