Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

.NET MeetUp Prague 2017 - Portable .NET Core on Linux -- Jan Vorlicek

130 Aufrufe

Veröffentlicht am

.NET MeetUp Prague, CZ - 2017/7/19
Talk: Portable .NET Core on Linux by Jan Vorlicek

Veröffentlicht in: Ingenieurwesen
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

.NET MeetUp Prague 2017 - Portable .NET Core on Linux -- Jan Vorlicek

  1. 1. Portable .NET Core on Linux Jan Vorlicek Microsoft
  2. 2. .NET Core on different Linux distros • CoreCLR / CoreFX use several native platform libraries (standard C/C++ libraries, CURL, ICU, SSL, …) • Managed code calls to those via thin PAL layer • Their SO names and supported APIs can differ per Linux distro or even distro versions • Native parts of CoreCLR / CoreFX built on one distro don‘t necessarily work on others • Targeting Linux if .NET Core native components are built as distro dependent complicates building .NET Core apps
  3. 3. Making .NET Core on Linux portable • Fixing issues with standard C/C++ libraries - build native components on the oldest supported distro. • Fixing issues with ICU / SSL / CURL • Shims to load the 3rd party libraries and resolve their symbols. • ICU – handle different SO name for each ICU version (libicuuc.so.52.1, libicuuc.so.53.1, …). On most distros, the symbol names contain version number too (u_strlen_52, u_strlen_52_1). • SSL – handle different SO name on Fedora based distros (libssl.so.10) and different one on the others (libssl.so.1.0.0). Debian 9 started to use libssl.so.1.0.2. • SSL - optional usage of some elliptic curves cryptography functions. • CURL – dynamic detection and optional handling of HTTP 2.0 request multiplexing.
  4. 4. Enabling standalone portable .NET Core apps • Using the RPATH in the host executable (apphost) • Set to $ORIGIN/netcoredeps • Developers can create that subfolder next to the main executable and store copies all native dependencies they want in there • Linux loader looks into this folder when loading dependencies before looking into standard locations • It works transitively (for dependencies of these dependencies etc.)