A template project for writing Arma 3 extensions in .NET Core, using ILCompiler provided by CoreRT
CoreRT https://github.com/dotnet/corert Dardo https://github.com/DardoTheMaster
-
Install .NET Core SDK and dependencies from Microsoft website ( https://dotnet.microsoft.com/download )
-
Open a terminal in the project directory
-
Install the native compiler
dotnet add package Microsoft.DotNet.ILCompiler -v 1.0.0-alpha-*
- Compile using
> dotnet publish /p:NativeLib=Shared -r win-x64|linux-x64
- Grab your native compiled library
/bin/Debug/netstandard2.0/linux-x64/native/dotnet_a3_x64.so
/bin/Debug/netstandard2.0/win-x64/native/dotnet_a3_x64.dll
Now the library is ready to be loaded from Arma servers / clients.
Obviously this won't never run faster than native c/c++ code. The only thing you'll really get, is that you'll be able to compile an extension for both windows and linux without touching in any ways your code.
- using '-c Release' flag while compiling will drastically reduce dll/so size
- sometimes compiling will take a lot of time