Add new host for running single-exe bundle prototype #26197
Conversation
@swaroop-sridhar I just copied over the bundle code as it exists now - i.e. just extracting files, not including the memory mapping changes you have in flight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Beyond the prototype, I wonder if corebundle
will need to support some more features. For example:
deps.json
resolution because ofADDITIONAL_DEPS
(which is popular for use with profilers, but infamous for not working very well)- Support for startup-hook
Even though we don't need the above features for the prototype app, supporting these features will have non-trivial impact on host-size.
This is fine, I think we can replace the |
@dotnet-bot test this please. |
/azp run coreclr-ci |
Azure Pipelines successfully started running 1 pipeline(s). |
@swaroop-sridhar yeah, beyond the prototype, we'd need some sort of json parsing (runtime configs, deps). I'm hoping we may be able to reasonably estimate what added overhead that would bring based on measurements of hostpolicy. What is expected to be the big cost for startup hooks on the host? I thought that was just passing in another runtime property based on an environment variable? |
OK, please share the number when you get to the measurement.
I agree about startup-hook; I mainly wrote it down as an example of things we've removed but will be present in the full set (to keep the size calculations as good as possible). |
Tried just ripping out the json parsing and deps resolving from hostpolicy - looked like a difference of ~160KB (Linux x64). From Leandro's investigations into switching to RapidJSON that was ~79KB less than casablanca. So in terms of size, I think a very rough estimate would be +80KB (with the switch to RapidJSON). |
Thanks for the explanation @elinor-fung . |
Initial addition of a basic host for running as a bundle. Only on Linux. Based on unixcoreconsole.
Everything under the
bundle/
subdirectory is basically a copy of the files from core-setup (as of 4b82b1e). I also copied pal/utils from core-setup and removed the parts we weren't using. There's probably more that could be pared down, but I wanted to get a starting point in for the prototype.This host can be copied over the real 'apphost' in an SDK install such that it will be used to create the bundle instead.