Skip to content

Commit

Permalink
Support concurrent plugin execution through instances (#81)
Browse files Browse the repository at this point in the history
See [Discord
thread](https://discord.com/channels/1011124058408112148/1050087851443888138/1298037616838443029).

It seems like there should be a `Plugin` type that is thread-safe, and a
`PluginInstance` type that is not thread-safe. The `Plugin `contains the
runtime and the compiled module, and you'd have something like `func(p
*Plugin) NewInstance() *PluginInstance` which would instantiate a wazero
module that would then be used in a single-threaded context.

The idea here is I can compile my plugin one time, and call functions
from the module as many times as I want, concurrently, without having to
re-compile.
  • Loading branch information
clarkmcc authored Nov 11, 2024
1 parent 1e331ca commit 6a22323
Show file tree
Hide file tree
Showing 7 changed files with 674 additions and 424 deletions.
Loading

0 comments on commit 6a22323

Please sign in to comment.