finds.dev

pangweiwei/slua

Fastest lua binding via static code generating for Unity3D and mono.

View on GitHub

★ 1,421CMITupdated Feb 2022

// the take

slua is a Lua-to-C# binding for Unity3D (and standalone .NET/mono) that uses static code generation instead of reflection to call into UnityEngine APIs from Lua scripts. It's aimed at Unity developers who want Lua-driven hot-reloadable gameplay logic without reflection overhead, including on iOS where JIT is restricted.

Static codegen avoids reflection and per-call GC allocation, which is a real perf win over reflection-based bindings like NLua for hot gameplay loops. Platform coverage is unusually thorough for a hobby-scale binding: iOS/iOS64 via il2cpp, Android, and a standalone mode that strips the Unity dependency entirely for server-side C# use. Feature surface goes beyond basic function calls - UnityEvent/delegate binding, coroutine/yield interop, and a remote debugger are all non-trivial things to get right in a Lua bridge.

No commits since February 2022 - Unity has shipped several major versions since, and nothing here confirms it works with current IL2CPP toolchains or Unity 6. Precompiled binaries only cover x86 (32-bit) and armv7/armv7s for iOS, armv7-a for Android - no arm64 Android binary despite Google requiring 64-bit since 2019, so you're building from source for any modern Play Store target. The static codegen workflow is manual and fragile: every Unity API surface change requires re-running the editor menu generator, and there's no automated check that generated wrappers match the engine version you're building against, which is the kind of thing that silently breaks at runtime. CI badges point at Travis CI and AppVeyor, both effectively dead for free open-source builds now, so 'build status: passing' isn't a signal you can trust.

We read the README, the directory tree and a key source file in November 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,421
Forks
429
Language
C
License
MIT
Last commit
18 Feb 2022

// nearby

If slua isn't quite it.

All repos →