IL2C - A translator for ECMA-335 CIL/MSIL to C language.
IL2C is a translator (transpiler) of ECMA-335 CIL/MSIL to C language.
We’re aiming for:
Original C# source code:
public static class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello world with IL2C!");
}
}
Translated to C source code (all comments are stripped):
IL2C_CONST_STRING(string0__, L"Hello world with IL2C!");
void HelloWorld_Main()
{
struct
{
const IL2C_EXECUTION_FRAME* pNext__;
const uint16_t objRefCount__;
const uint16_t valueCount__;
System_String* stack0_0__;
} frame__ = { NULL, 1, 0 };
il2c_link_execution_frame(&frame__);
frame__.stack0_0__ = string0__;
System_Console_WriteLine_10(frame__.stack0_0__);
il2c_unlink_execution_frame(&frame__);
return;
}
View with comments / other sample translation results (contain complex results)
IL2C current status is experimental, read a simple “Getting started” for first step.
If you need understanding deep knowledge for IL2C, see “Inside IL2C” .
Following lists are auto-generated by unit test.
Packages | master | devel |
---|---|---|
IL2C.Build | ||
IL2C.Interop | ||
IL2C.Core | ||
IL2C.Runtime | ||
IL2C.Runtime.msvc | ||
IL2C.Runtime.Arduino | (Constructing) | (Constructing) |
Configuration | master |
---|---|
Publish | |
Debug | |
Release |
Configuration | devel |
---|---|
Publish | |
Debug | |
Release |
Under Apache v2.
Slide: Making archive IL2C
Slide: Write common, run anywhere
Polish notation calculator: Minimum, but useful impls for “Win32”, “UEFI” and “M5Stack(ESP32)”
Slide: How to make the calculator / Making archive IL2C
Slide: Making archive IL2C
Slide: Making archive IL2C
Session video (Japanese): “Making archive IL2C play list”
Video letter (Japanese): Tested IL2C on micro:bit and arduino platform
Session video (Japanese): Making archive IL2C
Milestone 2+ informations (Japanese): Extensive Xamarin - Xamaritans
Milestone 1: Test on VC++ and check how C compiler’s optimizer works.
How overload/override/virtual method symbol calculus work.
How to translate exception handlers when combined the local unwind and global unwind.
This is the strcuture graph for the exection-frame and exception-frame.