# ThePhD/sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:

Repository: https://github.com/ThePhD/sol2
Canonical: https://ross.abutalabs.com/products/sol2
Homepage: http://sol2.rtfd.io/
Language: C++
License: MIT
License Family: permissive
Topics: sol, lua, lua-bindings, lua-binding, lua-scripting, simple, modern-cpp, gcc, clang, visual-studio, android, ios, ndk, visual-cpp, luajit, cpp17
Last push: 2025-03-07T21:01:58+00:00

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

## Adoption (not part of the score)
Stars 5132, forks 608 (observed 2026-08-28T04:09:11.019622+00:00)

## What it is
sol2 (Sol3) is a header-only C++17 library that provides fast, modern bindings between C++ and Lua, supporting Lua 5.1+, LuaJIT, and MoonJIT. It lets C++ code expose functions, lambdas, and user-defined types to Lua scripts and call Lua from C++ with a simple, high-performance API.

## Use cases
- embed a Lua scripting engine in a C++ application
- expose C++ classes and functions to Lua scripts
- script game logic in Lua from a C++ game engine
- call Lua functions from C++ and pass complex data types
- bind std::map, vectors, and smart pointers to Lua tables
- add a fast, easy-to-integrate scripting layer to a C++ project

## When to choose
- you need C++/Lua interop with top performance
- you want a header-only, drag-and-drop integration
- you need to bind modern C++ types (smart pointers, variants, containers) to Lua
- you support multiple Lua versions including LuaJIT

## When to avoid
- you need bindings for a language other than Lua
- you want a compiled library with ABI stability rather than header-only
- your project cannot use C++17

## Facets
- artifact type: library
- maturity: stable
- function: sdk, interpreter, plugin-system
- domain: programming-languages, developer-tools
- platform: cpp, cross-platform, windows
- tags: lua-bindings, header-only, luajit, scripting, modern-cpp, cpp17, game-development, linux, macos, android, ios

## Member repositories
- ThePhD/sol2 (main) score 27

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:11.019622+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:02:02.313378+00:00, confidence not recorded.
  - readme: https://github.com/ThePhD/sol2 (fetched 2026-08-28T04:09:11.019622+00:00, sha 50e85bad1b47)
- Data as of 2026-08-30T08:39:29.467469+00:00.
