CoreCLR Now Open Source
Written by Mike James   
Wednesday, 04 February 2015

Microsoft is pushing .NET further into open source. Now we have the part of the code that actually runs a .NET program. This means that the move to make .NET cross platform can begin.

 

net2

 

The way that Microsoft is drip feeding .NET in chunks, albeit huge chunks, is confusing if you aren't a .NET expert. Instead of open sourcing the existing .NET code, what Microsoft has done is to fork the entire project.

.NETCore is the new project to create a portable version of .NET. What we had until recently is CoreFX, the base class library, which has been steadily growing but is still no where near complete. Now we can add to this CoreCLR which consists of everything you need to run an IL, Intermediate Language program - the loader, the JITter, garbage collector and so on. You can think of it as the VM that runs .NET programs and

.NETCore = CoreFX + CoreCLR.

 

The ASP.NET libraries are being open sourced as a separate project, but not the code behind the classic forms-based ASP.NET, just the fancy new stuff. 

Why is this important? 

The simple reason is that it is CoreCLR that needs most modification to make .NET run on other architectures. That is, the clock is now ticking on the project to move .NET to other platforms. To quote the .NET Framework blog:

"Today, .NET Core builds and runs on Windows. We will be adding Linux and Mac implementations of platform-specific components over the next few months. We already have some Linux-specific code in .NET Core, but we’re really just getting started on our ports. We wanted to open up the code first, so that we could all enjoy the cross-platform journey from the outset."

Enjoy might not be the right word.

As mainhaxor comments on Reddit:

"Wow, the implementation of the GC (Garbage Collector) is 1 file (gc.cpp) that is 35000 lines long. My condolences to the developers who have been maintaining that."

The total repo has aproximately 2.6 million lines of code, the JIT being 320K lines and the GC 55K in total. It is estimated that when .NETCore is completely uploaded it will have around 5 million lines of code. As you might guess, CoreCLR is a mix of C++ and some C#.

 

coreclr

 

What has been, and still is, difficult to work out is when .NETCore will be needed within a real project. The blog has a little more to say about this:

...you might be wondering what type of apps you can build with it. There are two app types that we are working on and that you can try today: 

    • ASP.NET 5 web apps and services
    • Console apps

 

ASP.NET 5 currently makes use of Mono to run on Linux and Mac, although how many people actually do this is unclear - probably very few. The mention of console apps is probably because so far WPF and WinForms aren't actually part of .NETCore - in other words, .NETCore doesn't have a UI apart from the console class. This is going to limit its usefulness. It might be good to be able to write a .NET console app that runs under Windows, Linux and OSX, but how many .NET apps are console apps? 

So far console apps have been demoed on Windows but, as .NETCore isn't as yet cross-platform, not on anything else. 

 

consoleapp

 

You have to wonder what is going on.

Anyone using .NET on Windows isn't going to take a step backwards to use .NETCore without a credible UI. Then there is the fact that all of this has been done before by the Mono project. Where does Mono now fit in?  Apart, perhaps, from the occasional mention of "working together".

Why are we in the process of reinventing the wheel? 

Perhaps some of the answers will become clear during the .NET Conference scheduled for online participation in March. 

net2

Banner


OpenAI Library For .NET Exits Beta
19/11/2024

A few months ago the OpenAI .NET library was released as a beta. It has now reached version 2.0.0 and the time has come to leave beta and, with a few amendments enter production readiness.



IBM Opensources AI Agents For GitHub Issues
14/11/2024

IBM is launching a new set of AI software engineering agents designed to autonomously resolve GitHub issues. The agents are being made available in an open-source licensing model.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Wednesday, 04 February 2015 )