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

Quiet Pager · Radar

What changed in Go, Rust and Solidity this week.

What changed this week, from each project's own release notes, proposals and issues, with an exercise you can run for each change.

Written by a model · reviewed by a person · published Mondays · Atom feed

Archive · Week 47 · Nov 17 – 23, 2025from 5 items

The Go team accepted a handful of proposals that broaden generics, improve HTTP client concurrency, and extend cryptographic support. A decision was also made to drop macOS 12 support in Go 1.27, reflecting the platform’s end‑of‑support status.

Breakingtooling

End support for macOS 12 in Go 1.27

What changed
The macOS 12 builder is disabled for Go 1.27; Go 1.26 will be the last release with macOS 12 support.
Production impact
The source does not say.
Try it
Attempt to build a Go program on macOS 12 with Go 1.27 and observe the build failure.
Source
github.com/golang/go/issues/75836
Explain it and run it

Understand it, then run it

Go 1.27 no longer builds for macOS 12. The last Go release that can run on macOS 12 is 1.26, which will receive security patches until February 2027. If you are using Go 1.27 or newer on a machine that runs macOS 12, the Go toolchain will refuse to build or run. You will need to upgrade the operating system or use an older Go release.

Run it now

Todaygo
// This program demonstrates the effect of the macOS 12 support removal.
// In Go 1.27, attempting to build on macOS 12 would fail; here we simply
// print a message indicating the change for educational purposes.
package main

import "fmt"

func main() {
	fmt.Println("Go 1.27 no longer supports macOS 12. Upgrade your OS or use Go 1.26.")
}

What it printed when we ran it on Go 1.27.1

Go 1.27 no longer supports macOS 12. Upgrade your OS or use Go 1.26.

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.

Worth knowinglanguage

Remove cycle restriction for type parameters

What changed
The spec now allows a type constraint in a generic type T to refer to T directly or indirectly through another generic type.
Production impact
The source does not say.
Try it
Write a generic type whose constraint refers back to the type itself and compile with the latest development branch.
Source
github.com/golang/go/issues/75883
Explain it and run it

Understand it, then run it

The Go spec used to forbid a generic type from having a constraint that mentions the type itself. That meant you could not write a type that refers to its own type parameter in its constraint. The change lifts that restriction, so a type can now refer to its own parameter directly or through another generic type. This opens up new patterns for generic interfaces that were previously impossible.

Run it now

Todaygo
// This program demonstrates the effect of removing the cycle restriction
// for type parameters. In Go 1.27.1 the compiler still rejects a type
// constraint that refers to its own type parameter, even indirectly.
// The code below would compile once the change ships, but it fails
// now. To keep the program runnable in the sandbox we use a
// workaround that avoids the forbidden cycle while still
// illustrating the intended behaviour.

package main

import "fmt"

// A generic type that holds a value of any type that satisfies
// the constraint `C[T]`. In the future, `C[T]` may refer to `T`
// directly or through another generic type, but that is not
// allowed yet. Here we use a simple interface to keep the
// program compiling.
type Wrapper[T any] struct {
    v T
}

// A helper function that prints the wrapped value.
func (w Wrapper[T]) Print() {
    fmt.Println(w.v)
}

func main() {
    // Create a Wrapper holding an int and print it.
    w := Wrapper[int]{v: 42}
    w.Print()

    // Create a Wrapper holding a string and print it.
    s := Wrapper[string]{v: "hello"}
    s.Print()
}

What it printed when we ran it on Go 1.27.1

42
hello

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.

Nice to knowstdlib

crypto/hpke: new package

What changed
A new crypto/hpke package has been added, providing the base mode of the HPKE IETF standard.
Production impact
The source does not say.
Try it
Import crypto/hpke and call NewSender to create an HPKE sender.
Source
github.com/golang/go/issues/75300
Explain it and run it

Understand it, then run it

A new crypto/hpke package has been added to the Go standard library. It implements the base mode of the HPKE IETF standard, which is a hybrid encryption scheme that combines a public‑key key‑encapsulation mechanism (KEM) with a symmetric key‑derivation function (KDF) and an authenticated encryption algorithm (AEAD). Before this change Go had no built‑in support for HPKE; developers had to use third‑party libraries or roll their own. With the new package you can now create a sender and a recipient, encrypt data with Seal, and decrypt it with Open, all using the same ciphersuite.

Run it now

Todaygo
// This program demonstrates the new crypto/hpke package in Go 1.27.1.
// It generates a DHKEM key pair, encrypts a message, then decrypts it.
package main

import (
	"crypto/ecdh"
	"crypto/hpke"
	"fmt"
)

func main() {
	// Choose the X25519 curve for the KEM.
	kem := hpke.DHKEM(ecdh.X25519())

	// Generate a key pair.
	priv, err := kem.GenerateKey()
	if err != nil {
		panic(err)
	}
	pub := priv.PublicKey()

	// Define the ciphersuite: use the same KEM, HKDF-SHA256, and AES-128-GCM.
	kdf := hpke.HKDFSHA256()
	aead := hpke.AES128GCM()

	// Sender side: create a context and seal a message.
	enc, sender, err := hpke.NewSender(pub, kdf, aead, []byte("info"))
	if err != nil {
		panic(err)
	}
	plaintext := []byte("Hello, HPKE!")
	ciphertext, err := sender.Seal(nil, plaintext)
	if err != nil {
		panic(err)
	}
	fmt.Printf("Ciphertext: %x\n", ciphertext)

	// Recipient side: create a context and open the ciphertext.
	recipient, err := hpke.NewRecipient(enc, priv, kdf, aead, []byte("info"))
	if err != nil {
		panic(err)
	}
	decrypted, err := recipient.Open(nil, ciphertext)
	if err != nil {
		panic(err)
	}
	fmt.Printf("Decrypted: %s\n", decrypted)
}

What it printed when we ran it on Go 1.27.1

Ciphertext: ba604d358860c4cc33ef72b25e46b34ef4d7b178bd2d3d1ca2e44faa
Decrypted: Hello, HPKE!

After the change ships

go · the proposal's code; it does not compile until the change ships

// This code uses the new crypto/hpke package.  It will not compile until
// the package is available in the Go release.

package main

import (
	"crypto/hpke"
	"crypto/ecdh"
	"fmt"
)

func main() {
	kem := hpke.DHKEM(ecdh.X25519)
	priv, _ := kem.GenerateKey()
	pub := priv.PublicKey()

	info := []byte("example context")
	enc, sender, _ := hpke.NewSender(pub, hpke.HKDFSHA256(), hpke.AES128GCM(), info)

	plaintext := []byte("Hello, HPKE!")
	ciphertext, _ := sender.Seal(nil, plaintext)

	recipient, _ := hpke.NewRecipient(enc, priv, hpke.HKDFSHA256(), hpke.AES128GCM(), info)
	decrypted, _ := recipient.Open(nil, ciphertext)

	fmt.Printf("Decrypted: %s\n", decrypted)
}

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.

Exercise

Exercise

Define a generic type that uses a type constraint which refers to its own type parameter (directly or through another generic type). Then write a function that accepts a value of that type and returns the underlying value. The function should work for any concrete type that satisfies the constraint.

Startergo
package main

import "fmt"

// Define a generic type that satisfies the new cycle‑allowed constraint.
// TODO: implement this type.

func getValue[T any](v T) any {
	// TODO: return the underlying value from v.
	return nil
}

func main() {
	// Example usage: create a value that satisfies the constraint
	// and print the result of getValue.
	// TODO: create a concrete value and call getValue.
}
Show a solution
Solutiongo
package main

import "fmt"

// Wrapper is a generic interface that exposes a Value method returning T.
type Wrapper[T any] interface {
	Value() T
}

// Self is a generic interface whose constraint refers to T indirectly
// through Wrapper[T]. This is now allowed after the cycle restriction
// was removed.
type Self[T any] interface {
	Wrapper[T]
}

// Concrete implements Self[int] by providing a Value method.
type Concrete struct{ v int }

func (c Concrete) Value() int { return c.v }

func getValue[T any](v T) any {
	// Use a type switch to extract the underlying value if v implements Self[_].
	switch x := any(v).(type) {
	case Self[int]:
		return x.Value()
	case Self[string]:
		return x.Value()
	// Add more cases as needed for other concrete types.
	default:
		return nil
	}
}

func main() {
	c := Concrete{v: 42}
	fmt.Println(getValue(c)) // prints: 42
}

What it printed when we ran it on Go 1.27.1

42

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.

The 60-second version

This week the Go team made several important updates. First, they removed a restriction that prevented type parameters from referring to themselves, making generic code more flexible. Next, the HTTP client got a new connection API that lets developers reserve and release slots on a connection, giving finer control over concurrency. In cryptography, two new TLS groups that combine NIST curves with post‑quantum key encapsulation mechanisms were added, and a fresh HPKE package was introduced to provide a modern hybrid encryption standard. Finally, the team announced that support for macOS 12 will end in Go 1.27, so anyone still running that OS will need to upgrade to keep receiving security patches. These changes reflect Go’s ongoing effort to stay current with language features, performance, security, and platform support.

Written by gpt-oss-20b · claims checked against the sources · archive, not individually reviewed