Il2bc
Compiling C#/MSIL to Native Code using LLVM
Install / Use
/learn @FrankLIKE/Il2bcREADME
IL2BC - Compiling C#/MSIL to Native Code using LLVM.
What is IL2BC
IL2BC allows you to use C# instead of C++ to compile native cross-platform applications. Additionally IL2BC can convert any MSIL DLL into LLVM IR.
What IL2BC is not
IL2BC is not providing .NET Framework functionality
QUICK START
Hello World (C# code)
using System;
class X {
public static int Main (string [] args)
{
Console.WriteLine ("Hello, World!");
return 0;
}
}
Step 1) Generating LLVM IR file
Il2Bc.exe helloworld.cs /corelib:CoreLib.dll
Il2Bc.exe CoreLib.dll
It will generate 2 files helloworld.ll and CoreLib.ll
Step 2) Compiling executable file
llc -filetype=obj -mtriple=i686-w64-mingw32 CoreLib.ll
llc -filetype=obj -mtriple=i686-w64-mingw32 helloworld.ll
g++ -o helloworld.exe helloworld.obj CoreLib.obj -lstdc++ -lgc-lib -march=i686 -L .
It will generate exe file helloworld.exe which can be executed
PS. To Compile EXE file you need to have LLVM 3.6 and GCC MinGW which you can download from the following links
Binaries
PS2. You can download binaries from the site [http://csnative.codeplex.com/] http://csnative.codeplex.com/
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
