Skip to content

Add logic to muxer to invoke AOT'ed CLI #126171

@JeremyKuhne

Description

@JeremyKuhne

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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions