All Projects → kekyo → Il2c

kekyo / Il2c

Licence: apache-2.0
IL2C - A translator for ECMA-335 CIL/MSIL to C language.

Programming Languages

c
50402 projects - #5 most used programming language
csharp
926 projects
fsharp
127 projects

Projects that are alternatives of or similar to Il2c

go2cpp
Go to C++20 transpiler
Stars: ✭ 51 (-81.11%)
Mutual labels:  transpiler
idealingua-v1
IdeaLingua RPC for Scala, TypeScript, C#, Go
Stars: ✭ 13 (-95.19%)
Mutual labels:  transpiler
Duckuino
Simple DuckyScript to Arduino C converter.
Stars: ✭ 263 (-2.59%)
Mutual labels:  arduino
grumpy
Grumpy is a Python to Go source code transcompiler and runtime.
Stars: ✭ 378 (+40%)
Mutual labels:  transpiler
wxml-transpiler
Port of wcc.exe to JavaScript. wxml 文件编译器 --- 里面有很多无用代码,有空再整理下
Stars: ✭ 21 (-92.22%)
Mutual labels:  transpiler
Talkie
Speech library for Arduino
Stars: ✭ 256 (-5.19%)
Mutual labels:  arduino
go2hx
Go -> Haxe -> JS Java C# C++ C Python Lua
Stars: ✭ 49 (-81.85%)
Mutual labels:  transpiler
Umqttbroker
MQTT Broker library for ESP8266 Arduino
Stars: ✭ 264 (-2.22%)
Mutual labels:  arduino
systemboot
SystemBoot is a LinuxBoot distribution that works as a system firmware + bootloader, based on u-root
Stars: ✭ 103 (-61.85%)
Mutual labels:  uefi
Openknit
an open project about a digital knitting machine
Stars: ✭ 260 (-3.7%)
Mutual labels:  arduino
Yuescript
A Moonscript dialect compiles to Lua.
Stars: ✭ 172 (-36.3%)
Mutual labels:  transpiler
angular-webpack-skeleton
This project is deprecated. Please refer to https://github.com/Ks89/angular-cli-skeleton
Stars: ✭ 16 (-94.07%)
Mutual labels:  aot
Sinric
Amazon Alexa Smart home skill / Google Home Action for ESP8266 / ESP32 / Arduino
Stars: ✭ 259 (-4.07%)
Mutual labels:  arduino
PrimeG2Pkg
Running Windows on smartphone is not new. How about a calculator?
Stars: ✭ 68 (-74.81%)
Mutual labels:  uefi
M5ez
Complete interface builder for the M5Stack, an ESP32 based mini tinker-computer
Stars: ✭ 260 (-3.7%)
Mutual labels:  arduino
Go2SourcePawn
Go2SourcePawn is a transpiler that transforms a subset of Golang-like code to equivalent SourcePawn.
Stars: ✭ 13 (-95.19%)
Mutual labels:  transpiler
Arduinoplaystimberman
Arduino Plays Timberman
Stars: ✭ 254 (-5.93%)
Mutual labels:  arduino
Dynamixelsdk
ROBOTIS Dynamixel SDK (Protocol1.0/2.0)
Stars: ✭ 266 (-1.48%)
Mutual labels:  arduino
Arduino Cli
Arduino command line tool
Stars: ✭ 3,173 (+1075.19%)
Mutual labels:  arduino
Deepc
vendor independent deep learning library, compiler and inference framework microcomputers and micro-controllers
Stars: ✭ 260 (-3.7%)
Mutual labels:  arduino

IL2C - A translator for ECMA-335 CIL/MSIL to C language.

Intermediate language everywhere!

What's this?

  • IL2C is a translator (transpiler) of ECMA-335 CIL/MSIL to C language.

  • We're aiming for:

    • Better predictability of runtime costs
      Better human readability of C source code translated by IL2C.
    • Very tiny footprint requirements
      We're thinking about how to fit from large system with many resources to tiny embedded system. (KB order for the non-OSes system)
    • Better code/runtime portability
      Minimum requirement is only C99 compiler. The runtime minimum requires only the heap, CAS instructions, (POSIX) signal and setjmp/longjmp. Additional better feature is threading API (Win32, pthreads and FreeRTOS.)
    • Better interoperabilities for existed C libraries
      You can use the standard .NET interop technics (like P/Invoke.)
    • Containing seamless building systems for major C toolkits
      for example: CMake system, Arduino IDE, VC++ ...

Simple hello-world like code

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)

Getting started

IL2C current status is experimental, read a simple "Getting started" for first step.

If you need understanding deep knowledge for IL2C, see "Inside IL2C" .

Project status

Following lists are auto-generated by unit test.

Supported features (old)

Packages

Packages master devel
IL2C.Build NuGet IL2C.Build MyGet IL2C.Build
IL2C.Interop NuGet IL2C.Interop MyGet IL2C.Interop
IL2C.Core NuGet IL2C.Core MyGet IL2C.Core
IL2C.Runtime NuGet IL2C.Runtime MyGet IL2C.Runtime
IL2C.Runtime.msvc NuGet IL2C.Runtime.msvc MyGet IL2C.Runtime.msvc
IL2C.Runtime.Arduino (Constructing) (Constructing)

Build status

Configuration master
Publish Azure pipelines (.NET 4.5 / .NET Core 2.0)
Debug Azure pipelines (.NET 4.5 / .NET Core 2.0) Azure pipelines tests
Release Azure pipelines (.NET 4.5 / .NET Core 2.0) Azure pipelines tests
Configuration devel
Publish Azure pipelines (.NET 4.5 / .NET Core 2.0)
Debug Azure pipelines (.NET 4.5 / .NET Core 2.0) Azure pipelines tests
Build Stats
Release Azure pipelines (.NET 4.5 / .NET Core 2.0) Azure pipelines tests
Build Stats

License

Under Apache v2.

Related information

Photos of design process

  • #6-6: Near milestones

    #6-6: Near milestones

  • #6-14: Data flow analysis

    #6-14: Data flow analysis

  • Milestone 1: Test on VC++ and check how C compiler's optimizer works.

    Milestone 1: Test on VC++ and check how C compiler's optimizer works

  • #6-48: How mark-and-sweep garbage collection works on a translated code.

    #6-48: How mark-and-sweep garbage collection works on a translated code

  • How overload/override/virtual method symbol calculus work.

    How overload/override/virtual method symbol calculus work

  • How to translate exception handlers when combined the local unwind and global unwind.

    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.

    This is the strcuture graph for the exection-frame and exception-frame

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].