What is . Native Net?

Asked

Viewed 1,550 times

34

These days I saw our colleague Maniero commenting on the existence of .NET Native in a response on C# and C++.

I saw that Microsoft announced in April 2014 the preview of . NET Native. And searching on the subject I found this page explaining http://msdn.microsoft.com/pt-br/vstudio/dotnetnative.aspx .

From what I understand the idea is to allow code written in C# to be compiled to machine native code. This would make apps faster and using less memory.

As the subject is new and I am full of questions, here are some of them:

  1. Why Microsoft is doing this?
  2. No longer need to have the . NET Framework installed on the machines?
  3. We will have to compile our codes for different types of architectures (x86 x64)?
  4. Programs that use . NET Native will be able to run on any type of device and operating system?
  5. I will be able to develop a driver or an operating system with this
  6. This is only for Windows Store apps?
  7. There will be some difference in how we develop today?

Anyone who can share a little about the subject is very welcome. Even if you want to edit something in the question in order to enrich the issue.

  • 3

    Some questions are answered on FAQ

1 answer

29


Question by question.

Why Microsoft is doing this?

1. Every language that uses JIT has problems of slow initialization, and lacks several low-level optimizations, such as using vector instructions (SSE[n], AVX) because these are expensive to perform at the time the Jiter is executed.

No longer need to have the . NET Framework installed on the machines?

2. It will not be necessary to have . Net installed on the machines. The application will only make use of the library MRT.dll (Minimal CLR Runtime) and all other . Net libraries will be statically linked in the application.

We will have to compile our codes for different types of architectures (x86 x64)?

3. Yes and no. Native code is native code: x86-64 does not run on x86-32. But, for now at least, Microsoft will do the service, since it is providing . Net Native only to the Store for now. It will compile to native as this helps it to ensure more security in the available applications, as well as more optimizations, since it intends to make available several versions of the application, one for each device that it has been optimized by. Net Native to run.

Programs that use . NET Native will be able to run on any type of device and operating system?

4. Only the Windows platform will be supported. For now, it will be aimed even at smartphones (optimized apps run faster, better UX, lower power consumption). Maybe Xamarin will eventually develop something similar for Mono, but I believe it will only be for use on smartphones and will not be as automatic as the Microsoft version.

I will be able to develop a driver or an operating system with this

5. Not.

This is only for Windows Store apps?

6. For the time being.

There will be some difference in how we develop today?

7. Yes. There will be incompatibilities, bugs, parts of the. Net that are not yet supported by . Net Native, etc. This page better answer this question.

  • Mono’s had this solution for a long time.

  • Not that I know of. You’re not confused with Aot compilation?

  • I’m talking about Aot. It’s not exactly the same mechanism but it produces essentially the same result. BTW, excellent response.

  • 2

    Aot is different from . Net Native. It has many more limitations as to optimizations, distribution, generation of binaries, etc. So much so that parts of Assembly remain in MSIL format rather than native code, due to the limitations of the technique. Moreover, Aot is most often directly associated with GAC, which is also not the case with . Net Native. Aot’s equivalent of . Net FW is the ngen. I don’t know if you follow the development of Mono, but Miguel de Icaza has some excellent articles about it. I can search and pass it on to you if I find them, of course! Thank you!

  • No doubt that the MS is much more evolved as the AOT was one step ahead of the NGEN. Boss. I don’t follow closely.

  • 2

    I couldn’t find the articles, but follow the link to the blog: http://tirania.org/blog//index.html Maybe I read about Aot from Mono in the developers list, I don’t remember... in this case, I don’t have the emails anymore (I don’t usually save).

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.