To facilitate increased CLI performance, portions of the CLI will be AOT'ed. To facilitate this, the dotnet.exe muxer needs to be updated to look for and natively invoke dotnet-aot library when it exists. The dotnet-aot library will fall back for some commands to a non AOT'ed path by starting the runtime and running the CLI dotnet library itself. As such this would be the exported signature:
[UnmanagedCallersOnly(EntryPoint = "dotnet_execute")]
static int Execute(
nint hostPathPtr, // const char_t* host_path
nint dotnetRootPtr, // const char_t* dotnet_root
nint sdkDirPtr, // const char_t* sdk_dir
nint hostfxrPathPtr, // const char_t* hostfxr_path
int argc, // int argc (user args, no dotnet exe)
nint argvPtr) // const char_t** argv
dotnet-aot will start the runtime if needed with these arguments as the muxer already does:
hostfxr_initialize_for_dotnet_command_line
hostfxr_set_runtime_property_value
hostfxr_run_app
hostfxr_close
To facilitate increased CLI performance, portions of the CLI will be AOT'ed. To facilitate this, the
dotnet.exemuxer needs to be updated to look for and natively invokedotnet-aotlibrary when it exists. Thedotnet-aotlibrary will fall back for some commands to a non AOT'ed path by starting the runtime and running the CLIdotnetlibrary itself. As such this would be the exported signature:dotnet-aotwill start the runtime if needed with these arguments as the muxer already does:hostfxr_initialize_for_dotnet_command_linehostfxr_set_runtime_property_valuehostfxr_run_apphostfxr_close