开发者

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).


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


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜