V
V
Vadim Levkovich2021-05-23 14:31:31
C++ / C#
Vadim Levkovich, 2021-05-23 14:31:31

Using Lua along with C?

Hello! Is it possible to somehow merge the Lua language with the C language? I haven't heard of it, but for C++ along with Lua to hear, it's used in Roblox if I'm not mistaken.

And so ... if you still can, Lua is still suitable for games. If you use Lua code in C, what is it possible to make:
Game, Software or something else?

I will be glad to all answers! ;)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-05-23
@vabka

you take luajit and call it from sish code.
https://luajit.org/ext_c_api.html
The other way around is also possible, for this there is an ffi package in luajit

what is possible to do:
Game, Software or something else?

Whatever you want, then do it. For example, Tarantool and Redis use luajit for stored procedures

Z
Zettabyte, 2021-05-23
@Zettabyte

Is it possible to somehow merge the Lua language with the C language? ... If you use Lua code in C, then what can be done ... I will be glad to see all the answers! ;)

It's not entirely clear what exactly you mean by join.
For example, we included Lua's external script interpreter in the C++ program : https://rlab.ru/tools/rtester.html
This is a fully working project, we continue to develop and refine it. So it doesn't have to be just games.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question