Why Core CLR doesn't have C# sources?

The .NET Core CLR at some point needs to interface with the OS. Unfortunately, that interface still needs to be written in another language that can better talk to the OS because C# is compiled to IL, and something has to covert that IL into the assembly (JIT'ed) that the OS can then load and hand off to the CPU for execution.

Technically, it could be possible to have just the bare minimum needed to get things running and have the rest of itself be in IL, much like along the lines of an OS bootstrapping itself with a small amount of code written in assembly, and then have the rest written in C or C++. I think MS chose not to go down this route taking into account that they were competing with Java, and Java infamously has a very slow start up speed.

(Yes, I know that there is C# to native compiler, I've not dug too deeply on how dependent the resulting compiled code is dependent on having the framework available or not.)
 

Latest posts

Back
Top Bottom