This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Go · #002 · Week 40 · Sep 28 – Oct 4, 2026

Add `cgobindings` GOEXPERIMENT for cgo without a C toolchain

Worth knowingtooling

What changed
A cgobindings GOEXPERIMENT is accepted to allow experimentation with cgo that does not require a C toolchain.
Production impact
The source does not say.
Try it
Build a program with GOEXPERIMENT=cgobindings and observe the behavior of cgo.
Source
github.com/golang/go/issues/81662

Understand it, then run it

Run it now

Todaygo
package main

import (
	"fmt"
	"os"
)

func main() {
	// In Go 1.27.1 the cgobindings GOEXPERIMENT does not exist.
	// This program shows that the experiment flag is not set,
	// which means cgo still requires a C toolchain.
	if exp := os.Getenv("GOEXPERIMENT"); exp == "" {
		fmt.Println("GOEXPERIMENT is empty – cgobindings is not available")
	} else {
		fmt.Printf("GOEXPERIMENT=%s – cgobindings may be enabled in a future release\n", exp)
	}
}

What it printed when we ran it on Go 1.27.1

GOEXPERIMENT is empty – cgobindings is not available

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Written by gpt-oss-120b from the linked source · claims checked against the sources · human-reviewed