Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to embed C# code into a Lua script?

Tags:

c#

lua

I have a program which forces Lua as a choice for programming plugins. I'd like to take some existing C# code, and use it in this program. Is this possible?

I should add that I know one can easily embed Lua code into C#, but I haven't found the reverse anywhere. Thanks guys!

like image 730
PearsonArtPhoto Avatar asked Feb 22 '11 04:02

PearsonArtPhoto


People also ask

Is Embedded C still used?

It is the most popular language for embedded systems developers and is used in nearly 80% of all embedded projects.

Is Embedded C easy?

In embedded system programming C code is preferred over other language. Due to the following reasons: Easy to understand. High Reliability.

Is Embedded C the same as C?

Embedded C is just the extension variant of the C language. This programming language is hardware independent. On the other hand, embedded C language is truly hardware dependent. The compilers in C language are OS dependent.


1 Answers

Take a look at LuaInteface:

LuaInterface is a way for Lua programs to access the CLR (Common Language Runtime), otherwise known as .NET in the Windows world and Mono on Linux.

I'm not sure that's the official site, and there are multiple versions/forks (like MonoLuaInterface). Just search for LuaInterface.

like image 161
Michal Kottman Avatar answered Oct 21 '22 03:10

Michal Kottman