yanghuan / CSharp.lua

The C# to Lua compiler
Other
1.21k stars 200 forks source link

Even LuaJIT is too slow compared to the real dotnet! #423

Open 2dpdlja496or43iq opened 1 year ago

2dpdlja496or43iq commented 1 year ago

I suggest adding the feature to translate Lua code to C/C++ to utilize a C/C++ compiler to get the native binary. This will speed thing up.

Drake53 commented 1 year ago

What exactly is your use case? You talk about using C/C++ so it seems to me that you're not forced to use lua. In that case wouldn't it be easier to find a transpiler that transpiles C# directly to C/C++ instead of first transpiling C# to lua then transpiling that to C/C++?

2dpdlja496or43iq commented 1 year ago

transpiles C# directly to C/C++

Such a thing available?

yanghuan commented 1 year ago

unity IL2CPP can do this

2dpdlja496or43iq commented 1 year ago

What exactly is your use case? You talk about using C/C++ so it seems to me that you're not forced to use lua.

Run .NET program where a .NET runtime is not available.

Cheatoid commented 1 year ago

@2dpdlja496or43iq Try something like Nelua.


@yanghuan .NET NativeAOT is a thing as well (formerly known as CoreRT): https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/