Closed ureeves closed 1 week ago
I think this is a definite improvement, but does not yet close https://github.com/stacks-network/clarity-wasm/issues/468. For that issue, I'd like to go further and link in the callee contract into the current Wasm instance to call the function directly, rather than leaving Wasm and passing through Rust to go back to Wasm.
I added a diagram in the issue to help clarify.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Instantiating a
wasmtime::Engine
is an expensive operation, so it is best to do it only once for the duration of aGlobalContext
. Cloning an engine is, however, not an expensive operation (just anArc::clone
) and we use it to avoid referring to the global context already referred to by the instantiatedClarityWasmContext
.See-also: https://github.com/stacks-network/clarity-wasm/issues/468