2025-08-15 Generate a QR code with typst
I stumbled across this neat package for typst that lets you generate QR codes. While there are plenty of tools to generate QR codes, it's nice to see more options (especially in a document generation system). Here's a quick run by in how I used it (assuming you already installed typst).
Start with a typst file.
Below is an example of one that generates a QR code for going to this site. Save it in a file named something like qrcode.typ.
#import "@preview/rustycure:0.1.0": qr-code
#qr-code("https://lifewithbsd.org/")
https://lifewithbsd.org/ // Having a human readable version is playing nice
Now generate it
$ typst compile --format png qrcode.typ
Look for the generated output
Usually when you compile a typst file it creates an output file that matches the filename with the proper extension (example in this case: qrcode.typ -> qrcode.png)
Enjoy!