This commit continues to rejigger the API of watt by having a
top-level Instance type now instead of a suite of top-level functions.
By using a top-level struct we can store an internal identifier
(usize) which is used to key a thread-local cache for wasm blobs. This
should allow us to share resources like module instantiations across
macro invocations, ensuring that we only instantiate modules
once-per-process.
This commit continues to rejigger the API of
watt
by having a top-levelInstance
type now instead of a suite of top-level functions. By using a top-levelstruct
we can store an internal identifier (usize
) which is used to key a thread-local cache for wasm blobs. This should allow us to share resources like module instantiations across macro invocations, ensuring that we only instantiate modules once-per-process.Closes #16