This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Description
A note on terminology first:
- wasm runtime - is a wasm bytecode blob that provides the logic of blockchain built on substrate
- execution engine - is piece of software that is able to execute a given wasm bytecode,
- executor - a module of Substrate that sets up an engine for executing a wasm runtime
Right now, the sc-executor interface to a runtime is split onto two parts:
WasmModule is an object that represents a wasm runtime and obtained by giving an engine a wasm blob. Then it can be used to get an instance of WasmRuntime, i.e. an instantiated wasm module that is ready for serving runtime calls.
This split is very important for the engines that require non-trivial amount to get a prepared module, i.e. that use compilation.
However, this model doesn't recognize a need of reusing something across all WasmModule or WasmRuntimes. For example, in sc-executor-runtime Engine and Store instances are not shared among WasmModules.