17
#devsum15 Inside CLR – A New Look to Open Source CoreCLR Martin Kulov www.kulov.net @kulov [email protected]

Inside CoreCLR

Embed Size (px)

Citation preview

#devsum15

Inside CLR – A New Look to Open Source CoreCLR

Martin Kulovwww.kulov.net

@kulov [email protected]

This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.

dotnet/coreclr

This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.

dotnet/corefx

The .NET Compiler Platform ("Roslyn") provides open-source C# and Visual Basic compilers with rich code analysis APIs.

dotnet/roslyn

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.

aspnet/dnx

Installing CoreCLR

#devsum15@kulov [email protected]

High level steps

Install DNVM

Install .NET Core DNX

DNU restore

Run DNX

DNVMDNXDN

U

WTF!?

#devsum15@kulov [email protected]

Execution Environment

.NET apps need host

They get bootstrapped, jitted, ngened,

configured

Hosts: Windows Shell, SQL Server, ASP.NET,

IE

#devsum15@kulov [email protected]

.NET Execution Environment

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.

aspnet/dnx

#devsum15@kulov [email protected]

Detailed steps

Install DNVM /@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object

net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"

Install .NET Core DNX / dnvm install -r coreclr latest -u

Install dependencies / dnu restore

Run DNX / dnx . run*https://github.com/dotnet/coreclr/blob/master/Documentation/get-dotnetcore-dnx-windows.md

Building CoreCLR

#devsum15@kulov [email protected]

Prerequisites

CMake - http://www.cmake.org/download

NuGet - https://nuget.org/nuget.exe

Restore NuGet dependencies

*https://github.com/dotnet/coreclr/blob/master/Documentation/windows-instructions.md

#devsum15@kulov [email protected]

> git clone https://github.com/dotnet/coreclr

> build.bat clean VS2015

*https://github.com/dotnet/coreclr/blob/master/Documentation/windows-instructions.md

#devsum15@kulov [email protected]

> csc.exe csc /nostdlib /noconfig sample.exe …

> CorRun.exe sample.exe

*https://github.com/dotnet/coreclr/blob/master/Documentation/windows-instructions.md

DEMO: Debugging CoreCLR

Thank [email protected] @kulov https://www.linkedin.com/in/kulov

www.kulov.net