Giter VIP home page Giter VIP logo

il2bc's Introduction

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

LLVM 3.6 and GCC MinGW

PS2. You can download binaries from the site [http://csnative.codeplex.com/] http://csnative.codeplex.com/

il2bc's People

Contributors

asdalexander77 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.