PlutoLang / Pluto

A superset of Lua 5.4 with a focus on general-purpose programming.
https://pluto-lang.org
MIT License
367 stars 22 forks source link

Lua header files cannot be included in a C project #844

Closed Sculas closed 5 months ago

Sculas commented 5 months ago

While Pluto cannot be compiled using a C compiler (since it's a C++ project), it does allow one to link it for C using PLUTO_C_LINKAGE. However, the accompanying header files cannot be used because they're also C++. So then begs the question, how to use Pluto in a C project? For context, this isn't an actual C project, rather it's Go, but it only supports C interop (and thus, only C header files).

Sainan commented 5 months ago

It's the same ABI as Lua, so you would typically include lua.h, lualib.h, and lauxlib.h. When in doubt, grab these headers from the official Lua sources.