0

That is to say, if one was so inclined, could they use the source of CoreCLR and other parts of the .NET Framework that were recently released on GitHub to create a runtime of their own based on the CLR? As in, changing the structure of CIL (e.g. adding opcodes), not as in writing a new compiler for a language that produces it.

Does the source provided contain all the necessary code to create a copy of the offical CLR, and if so, would it be legal to redistribute a modified version?

AlphaModder
  • 3,266
  • 2
  • 28
  • 44
  • Could someone explain why this is a bad question, other than downvoting? Is it considered off topic? – AlphaModder Jun 20 '15 at 10:05
  • if you look at the graph [here](https://github.com/dotnet/corefx-progress) you'll see that they are at 56% of publishing the source code of the libraries they want to release open source. So there is still a 44% missing. And note that they won't release things like WPF, WinForms and other pieces. Missing "things" (for now, but they should come) are for example `System.Globalization`, `System.Threading.Thread`, `System.Threading.ThreadPool`, `System.Reflection.Emit`... – xanatos Jun 20 '15 at 10:19
  • 1
    @xanatos If I'm not mistaken, that's the progress on CoreFX, the .NET Libraries, not CoreCLR, the .NET Runtime itself. – AlphaModder Jun 20 '15 at 10:22
  • A .NET runtime (CoreCLR) without the .NET libraries is quite useless... Unless you want to try to reuse the Microsoft libraries... Not sure if it is possible to use CoreCLR + "official" Microsoft assemblies – xanatos Jun 20 '15 at 10:24
  • Perhaps what you are looking for is the [dnx](https://github.com/aspnet/dnx) *The .NET Execution Environment contains the code required to bootstrap and run an application. This includes things like the compilation system, SDK tools, and the native CLR hosts.* There was a question about what the DNX was: http://stackoverflow.com/q/30374725/613130 – xanatos Jun 20 '15 at 10:26
  • @xanatos As far as I am aware, the official microsoft assemblies aren't special in any fashion, other than some provisions in the CLR itself for special types, they are just standard CIL. So as long as the bytecode is backwards-compatible, I don't see why there'd be an issue. – AlphaModder Jun 20 '15 at 10:26
  • The mscorlib is integral to the working of .NET (it contains the base types)... It isn't clear how they "splitted" it between CoreCLR and CoreFX. I think that the best thing is that you begin playing with DNX, that should be a compiler + runtime "packaged" – xanatos Jun 20 '15 at 10:27
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/81059/discussion-between-alpha-m-cubed-and-xanatos). – AlphaModder Jun 20 '15 at 10:31

1 Answers1

0

The CoreCLR has both a MIT License and a patent promise so it should be ok to use it to build your "competing" CLR.

The patent promise isn't unlimited but:

Microsoft Corporation and its affiliates ("Microsoft") promise not to assert any .NET Patents against you for making, using, selling, offering for sale, importing, or distributing Covered Code, as part of either a .NET Runtime or as part of any application designed to run on a .NET Runtime.

and there are some limitations about what a .NET Runtime can be (your implementation must include all the features needed in a .NET Runtime to make it compatible with ECMA-335... so you can add pieces but you can't remove some pieces).

Note that the DNX is probably more similar to what you need: it uses CoreCLR and includes a compiler and other pieces. It is:

The DNX (a .NET Execution Environment) contains the code required to bootstrap and run an application, including the compilation system, SDK tools, and the native CLR hosts.

The DNX is released under the Apache license. The Apache license includes a patent grant in the license.

xanatos
  • 109,618
  • 12
  • 197
  • 280