-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
As I understand it, you use import_fn to defer some operation from a plugin to the host by means of defining a host_fn, but I cannot seem to get this to work - I'd love to experiment a bit more with this and I'd really appreciate some docs or an example that combines the use of import_fn and host_fn - the way I imagine this to work:
plugin code:
import extism
@extism.import_fn("app", "some_host_op")
def some_host_op(): ...
@extism.plugin_fn
def some_fn():
some_host_op()app code:
import extism
@extism.host_fn
def some_host_op():
print("...")
manifest = ...
with extism.Plugin(manifest, wasi=True) as plugin:
plugin.call("some_fn", "")Metadata
Metadata
Assignees
Labels
No labels