Closed mhmd-azeez closed 1 year ago
Keeping the two PRs in sync is a lot of work, will merge this and we can change things in #1 if necessary
Keeping the two PRs in sync is a lot of work, will merge this and we can change things in #1 if necessary
Sorry for the delay in review - been difficult to get enough dedicated time while traveling! After today I should be able to help much more. Thank you for being proactive here!
@nilslice no worries, looking forward to your review!
By default, Go (and some other languages) expects imports to be from the
env
namespace. This creates a problem for us because each Wazero runtime can only have only oneenv
module at a time and we can't modify modules once we initialize them. We don't have this problem in wasmtime because theLinker
allowed us to register host functions in any module we wanted without having to create a special host moduleThe only solution I could think of is to create a Wazero runtime per plugin. This way, when creating the
env
module, we can also register the custom host functions.