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

Inside CoreCLR

Aug 12, 2015

Download

Technology

Martin Kulov
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Inside CoreCLR

#devsum15

Inside CLR – A New Look to Open Source CoreCLR

Martin Kulovwww.kulov.net

@kulov [email protected]

Page 2: Inside CoreCLR
Page 3: Inside CoreCLR
Page 4: Inside CoreCLR

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

Page 5: Inside CoreCLR
Page 6: Inside CoreCLR

Installing CoreCLR

Page 7: Inside CoreCLR

#devsum15@kulov [email protected]

High level steps

Install DNVM

Install .NET Core DNX

DNU restore

Run DNX

Page 8: Inside CoreCLR

DNVMDNXDN

U

WTF!?

Page 9: Inside CoreCLR

#devsum15@kulov [email protected]

Execution Environment

.NET apps need host

They get bootstrapped, jitted, ngened,

configured

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

IE

Page 10: Inside CoreCLR

#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

Page 11: Inside CoreCLR

#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

Page 12: Inside CoreCLR

Building CoreCLR

Page 13: Inside 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

Page 14: Inside CoreCLR

#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

Page 15: Inside CoreCLR

#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

Page 16: Inside CoreCLR

DEMO: Debugging CoreCLR

Page 17: Inside CoreCLR

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

www.kulov.net