# Shopify/go-lua

A Lua VM in Go

Repository: https://github.com/Shopify/go-lua
Canonical: https://ross.abutalabs.com/products/go-lua
Language: Go
License: MIT
License Family: permissive
Last push: 2025-07-18T18:33:21+00:00

## Health v2 (maintenance only)
Score: 47/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 32, release rhythm 35, longevity 100
- inputs: {"age_days": 4639, "days_push": 411, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3451, forks 213 (observed 2026-08-28T04:08:05.320210+00:00)

## What it is
go-lua is a port of the Lua 5.2 virtual machine and compiler to pure Go, provided as a Go library for embedding Lua scripting into Go applications. It is compatible with binary files produced by the reference Lua `luac` and is used in production at Shopify.

## Use cases
- embed a Lua scripting engine in a Go application
- run Lua scripts from Go code
- let users customize Go tool behavior with Lua scripts
- execute Lua bytecode compiled with luac
- script load generation or resiliency tooling flows

## When to choose
- you want Lua scripting in Go without cgo or C dependencies
- you need compatibility with Lua 5.2 bytecode from luac
- you want a simple, pure-Go library API rather than a standalone interpreter binary

## When to avoid
- you need coroutines, Lua pattern matching (regex), or string.dump, which are not implemented
- you need weak reference tables
- you need maximum interpreter performance - C Lua is ~6x faster and gopher-lua is ~20% faster
- you want a command-line Lua interpreter - this is a library only

## Facets
- artifact type: library
- maturity: maintenance
- function: interpreter, parser, sdk
- domain: programming-languages, parsers, developer-tools
- platform: go, cross-platform
- tags: lua-vm, scripting, pure-go, lua-5-2, embedding, automation

## Member repositories
- Shopify/go-lua (main) score 47

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:05.320210+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:37:33.950408+00:00, confidence not recorded.
  - readme: https://github.com/Shopify/go-lua (fetched 2026-08-28T04:08:05.320210+00:00, sha ab3770869223)
- Data as of 2026-08-30T08:39:29.467469+00:00.
