Skip to Content
defold-typescript libraries
defold (official)

defold/extension-qrcode

A small native extension that encodes and decodes QR codes, using quirc for decoding. It registers a qrcode Lua module with qrcode.scan, which reads the text from an image buffer, and qrcode.generate, which returns a QR code image buffer and its side length.

Lua API not typed — upstream ships no .script_api, so resolve skips it.

  • GitHub: defold/extension-qrcode — pinned to 1.1 (released while Defold 1.2.128 was current)
    1. Pick a release from defold/extension-qrcode releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. See the included example app, which scans camera images and creates QR codes; it depends on a camera extension that supports only macOS, iOS and Android.

Engine APIs

Both functions work on buffer objects: scan expects a first stream of UINT8 * 3 texels, and generate returns a data stream of UINT8 * 1.

On this page