Skip to content

wish: allow mono runtime components to provide QCalls to the runtime #53607

@lambdageek

Description

@lambdageek

See, for example, https://github.com/dotnet/runtime/pull/53500/files#diff-8fa4a2213aa9c853fd1afd18bf447a57ba660d5ef23e04525c614594f8942e89 where the mono EventPipe component adds icalls. There is a lot of boilerplate: adding the methods to icall-def-netcore.h, adding methods to the component vtable, implementing stub methods in the comoponent stub, adding boilerplate icall implementations that call the component methods.

Maybe we ought to have a way for a component to provide the runtime with a list of qcall implementations.

(Using qcalls would be better because then we can share more managed code with CoreCLR; but icalls would be ok, too).

Potential complications:

  • on Wasm the linker knows how to generate a slimmed down icall table that just includes the icalls actually used by managed code; it would be a shame to lose that
  • complexity due to all the variations in dynamic/static component linking

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions