Skip to content

Add mechanism for host to provide callback for getting assembly data #112706

Closed
@elinor-fung

Description

@elinor-fung

The runtime should enable a way for the host to provide the data representing an assembly. This is a similar idea to the existing bundle_probe, but with the host fully handling populating the data (as opposed to it being an offset into the current executable that the runtime then maps).

To do this, we can update the host_runtime_contract with a new callback:

// Probe for an assembly by `path`. Sets the data representing the assembly (`data`, `size`)
// Returns true if found, false otherwise.
bool(HOST_CONTRACT_CALLTYPE* external_assembly_probe)(
    const char* path,
    /*out*/ void** data
    /*out*/ int64_t* size);

This will be called before the default assembly resolution by the runtime. If both bundle_probe and external_assembly_probe are set, bundle_probe is called first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Hostin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions