Skip to content

support for "host call context" #84

Open
@chrisdickinson

Description

@chrisdickinson

I just ran into this while implementing the XTP Go SDK – in the Rust and JS Extism SDKs there's a concept of "host context". When you call an export from a plugin, you may set a "host context" value which will be propagated to any host functions called by the plugin during the execution of the export. The host context is invisible to the plugin, however.

IIUC, the Go SDK seems to support propagating a context from the creation of a plugin to any host function call; however this is slightly different than the "host context" feature which applies per invocation. (For example, this difference comes into play when the creation of a plugin happens in a "pooled" context but the invocation happens during a request/response cycle.) The extism kernel wasm implements this using an exported externref (and blocking import access to that export from any submitted plugin.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions