Lothar
Lothar

Reputation: 13067

Is there any none .NET/CLI based implementation of a C# compiler?

I just want the ECMA language translated into native code with the fundamental runtime (garbage collector) etc. I'm not talking about .NET just the language specification of C#.

Using C# like any other native compiling language as a langauge alternative for Delphi, D or C++ because it offers generics, expanded types, garbage collection and many other nice features. As a langauge it's pretty nice.

But i don't like .NET nor do i find it very portable (.NET for PA-RISC's HP-UX anyone?).

So a compilation to C99 would be much, much better then compilation to native (that’s how it works very well for Eiffel).

Upvotes: 5

Views: 521

Answers (4)

Noldorin
Noldorin

Reputation: 147280

Microsoft's Native Image Generator (NGEN) is capable of converting .NET assemblies into native programs. However, it only means that the JIT compiler is being bypassed, and the .NET Framework is still required to be installed.

The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local computer. The runtime can use native images from the cache instead of using the just-in-time (JIT) compiler to compile the original assembly.

Perhaps you could elaborate on the context in which you need native code for your .NET assemblies? Depending on the purpose, NGEN may be good enough, though a tool that actually eliminates dependencies on the .NET Framework may be what you want.

Upvotes: 0

Lucero
Lucero

Reputation: 60190

Maybe the Salamander .NET Mini-Deployment tool may help you, it does convert the code to native and has an embedded runtime, so that you don't need the .NET framework for deployment.

Upvotes: 0

Alex
Alex

Reputation: 1247

The Mono framework has support for native compilation, which they call Ahead Of Time (AOT) compilation. More here: http://www.mono-project.com/AOT

Upvotes: 1

Matthew Whited
Matthew Whited

Reputation: 22443

Singularity RDK uses Bartok. Also the .Net Micro Framework has several native compilers (last I used the Micro Framework it did not have a native x86 compiler).

A third party option would be to use the Salamander .NET Linker

Upvotes: 0

Related Questions