Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for "host call context" #84

Open
chrisdickinson opened this issue Nov 5, 2024 · 0 comments
Open

support for "host call context" #84

chrisdickinson opened this issue Nov 5, 2024 · 0 comments

Comments

@chrisdickinson
Copy link

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant