Skip to content
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

Support AOT tools in .NET tools #40931

Open
baronfel opened this issue May 16, 2024 · 2 comments
Open

Support AOT tools in .NET tools #40931

baronfel opened this issue May 16, 2024 · 2 comments
Assignees
Labels
Area-Tools untriaged Request triage from a team member

Comments

@baronfel
Copy link
Member

Tools of all kinds benefit from fast execution speeds, so compiling them for AOT makes sense. .NET Tools are a very easy way to distribute tools, so it would seem natural that tools be able to be AOT compiled. There are a few hurdles that would need to be cleared first, though:

  • Tools would need to support a notion of RID-specificity
  • We would need to be able to indicate that certain already-compiled binaries should be packaged as the RID-specific version of a tool
  • on tool install, we'd need to be able to detect if a tool was already-compiled and not create the apphost shim for that tool

Another, potentially more crazy idea might be to on-demand AOT a tool for the current platform on tool install. This could require data that we don't already have packaged in the tool, and might require dependencies like a C/C++ compiler that aren't part of our already-expressed dependency tree for the SDK.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label May 16, 2024
@knocte
Copy link

knocte commented May 22, 2024

potentially more crazy idea might be to on-demand AOT a tool for the current platform on tool install.

IMO it's not that crazy. It would save lots of disk space on the nuget side of things (not to mention simplifying the solution for this github issue), and if you think about it, a user that installs a dotnet tool is in most cases a dev, so it's not too insane to require him to have some compiler tools to be able to have his tool optimized for speed.

(Just my 2 cents)

@KalleOlaviNiemitalo
Copy link

If a user installs a global tool by using an x86 .NET SDK on an x64 operating system, then would dotnet tool install AOT-compile that tool for x86, for x64, or both?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Tools untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants