-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single-File: Implement statically linked apphost #32823
Comments
Adding notes from an offline discussion:
@swaroop-sridhar wrote:
This is noted in the design here: https://github.com/dotnet/designs/blob/master/accepted/2020/single-file/design.md#host-builds (although I realized not in so many words). On Linux, we’ll additionally link the CoreCLR components to this host.
Yes, for any given target, we’ll have two hosts:
For a given TFM and RID, the SDK expects a unique apphost package, from which it obtains the apphost to use:
I think it’s better to publish the SuperHost as its own package -- that’s only downloaded for SingleFilePublish scenarios, again based on TFM, RID, PublishSingleFile, and Self-Contained properties. The StaticHost fits well with • StaticHost is a temporary artifact, till super-host is built for Windows, so staying close to superhost scenario. A proposal is to build the
Linux
For self-contained single file builds (only), the SDK obtains native components from |
CC: @dsplaisted @wli3 |
So that means publish self contained vs non self contained and Windows VS Linux will have different host. 1 code path now spitted to 4 code path, including how the package flows. If so, we also need to double the apphost pack count in core-sdk. We used to have 8 apphost pack, and now it will be 16? All of them can be done, but we need to watch out the infra load, and we may need more time to design it. Also, can they be stored in the same package? apphost and superhost? May reduce some of the issues. |
I agree that it would make sense to have both hosts in the same package. I do not think we should be calling this superhost. It does not say anything about what it is. This can be described netcoreapp single file host. I would call it netcoreapp host or single file host, but it would be a good idea for others to chime in. |
@wli3 the change will be for self-contained single-file publish vs all other paths.
We can configure the new hosts to be set within the existing host packages if that is simpler
I agree. @samsp-msft can you please suggest the proper names for this host? |
I wanted to note the changes to be done in the SDK to support this feature. Please take a look at it, and let me know any suggestions/corrections. There are two main tasks that need to be done for self-contained single-file publish scenario:
|
@swaroop-sridhar Sounds good. Can you file an issue on the SDK for these changes? Are you planning to send a PR for them or is this something we will need to do? FYI @marcpopMSFT |
Thanks @dsplaisted I was planning to implement the change, of course, with some help from SDK devs. |
@VSadov, I think we want to see the following annotations on In microsoft.netcore.app.runtime.linux-x64 <FileList FrameworkName="Microsoft.NETCore.App" TargetFrameworkVersion="5.0" TargetFrameworkIdentifier=".NETCoreApp" Name=".NET 5.0">
… managed entries …
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/createdump" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.Globalization.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.Globalization.Native.so" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.IO.Compression.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.IO.Compression.Native.so" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.IO.Ports.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.IO.Ports.Native.so" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.Native.so" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.Net.Security.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.Net.Security.Native.so" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.Security.Cryptography.Native.OpenSsl.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libSystem.Security.Cryptography.Native.OpenSsl.so" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libclrjit.so" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libcoreclr.so" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libcoreclrtraceptprovider.so" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libdbgshim.so" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libhostfxr.so" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libhostpolicy.so" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libmscordaccore.so" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/linux-x64/native/libmscordbi.so" Type="Native" DropFromSingleFile="true"/>
</FileList> In microsoft.netcore.app.runtime.osx-x64 <FileList FrameworkName="Microsoft.NETCore.App" TargetFrameworkVersion="5.0" TargetFrameworkIdentifier=".NETCoreApp" Name=".NET 5.0">
… managed entries …
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Globalization.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Globalization.Native.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.IO.Compression.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.IO.Compression.Native.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.IO.Ports.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Native.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Net.Security.Native.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Net.Security.Native.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Security.Cryptography.Native.Apple.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Security.Cryptography.Native.Apple.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Security.Cryptography.Native.OpenSsl.a" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libSystem.Security.Cryptography.Native.OpenSsl.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libclrjit.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libcoreclr.dylib" Type="Native"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libdbgshim.dylib" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libhostfxr.dylib" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libhostpolicy.dylib" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libmscordaccore.dylib" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="0.0.0.0" Path="runtimes/osx-x64/native/libmscordbi.dylib" Type="Native" DropFromSingleFile="true"/>
</FileList> In microsoft.netcore.app.runtime.win-* <FileList FrameworkName="Microsoft.NETCore.App" TargetFrameworkVersion="5.0" TargetFrameworkIdentifier=".NETCoreApp" Name=".NET 5.0">
… managed entries …
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-console-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-console-l1-2-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-datetime-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-debug-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-errorhandling-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-file-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-file-l1-2-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-file-l2-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-handle-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-heap-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-interlocked-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-libraryloader-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-localization-l1-2-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-memory-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-namedpipe-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-processenvironment-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-processthreads-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-processthreads-l1-1-1.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-profile-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-rtlsupport-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-string-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-synch-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-synch-l1-2-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-sysinfo-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-timezone-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-core-util-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-conio-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-convert-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-environment-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-filesystem-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-heap-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-locale-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-math-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-multibyte-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-private-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-process-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-runtime-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-stdio-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-string-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-time-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/api-ms-win-crt-utility-l1-1-0.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="42.42.42.42424" Path="runtimes/win-x64/native/clrcompression.dll" Type="Native"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/clretwrc.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/clrjit.dll" Type="Native"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/coreclr.dll" Type="Native"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/createdump.exe" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/dbgshim.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/hostfxr.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/hostpolicy.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/mscordaccore.dll" Type="Native"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/mscordaccore_amd64_amd64_5.0.20.22715.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/mscordbi.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="5.0.20.22715" Path="runtimes/win-x64/native/mscorrc.dll" Type="Native" DropFromSingleFile="true"/>
<File FileVersion="10.0.19041.1" Path="runtimes/win-x64/native/ucrtbase.dll" Type="Native" DropFromSingleFile="true"/>
</FileList> Can you please take a look at this? I'll work on consuming these annotations. Thanks. |
not dropping |
No, we'll keep that to enable dump-debugging. Please see https://github.com/dotnet/designs/blob/master/accepted/2020/single-file/design.md#host-builds |
The static-host Generating Linux super-host |
In order to support single-file apps, implement the "static-host" host-builds as described here, publish them to be consumed by the SDK.
The text was updated successfully, but these errors were encountered: