finds.dev← search

// the find

rsc/qr

★ 304 · Go · BSD-3-Clause · updated Oct 2022

QR codes

A pure-Go QR code encoder from Russ Cox, plus a neat side project (qart) for generating QR codes that double as recognizable images. Useful if you need to generate QR codes in Go without pulling in a C binding or a kitchen-sink imaging library.

Implements the Reed-Solomon/GF(256) math itself (gf256 package with its own tests) rather than shelling out to libqrencode, even though a cgo wrapper is included for comparison. The qart subpackage is a genuinely interesting piece of work — it solves the constrained optimization problem of picking error-correction pixels so the QR code renders as a target image, including a WASM build for running it in-browser. Small surface area, no external dependencies for the core qr.go encoder.

No commits since October 2022 and no indication Cox is actively maintaining it — any encoding bug or QR spec edge case is yours to fix. Encode-only: there's no decoder, so you can't round-trip or validate output without a separate library. Zero package documentation beyond a one-line README and godoc comments; you're reading qr.go to understand the API. Error-correction level and output format options aren't discoverable without digging into the source, and there's no versioned release/tag to pin against.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →