Decoupling VM from State machine #161
Labels
needs review
issue may be outdated or wrong
refactoring
type: refactoring
tech debt
~virtual machine
component: virtual machine
Milestone
Motivation
Currently State machine and VM projects are tightly coupled:
wast
module filenames are hardcoded in State machine's Main class. There setting should be tunable and provided via some configuration.As a consequence those 2 projects are not isolated: someone cannot use the State machine without an initialized WASM instance; the State machine behavior cannot be tested in separation from VM. Also, the State machine code would likely be needed to change in case of even minor changes in the VM processing logic.
Proposed change
First, we need to move an integration logic with tests into a dedicated Sbt project. As a result, the State machine should not depend on Asmble-specific logic anymore: it might be even run and tested with some stub instead of real VM instance. Some new, Asmble-'agnostic', tests should be implemented in addition to the current, mostly integrational, State machine tests.
We also need to provide a way to configure the setup of currently used VM implementation flexibly, including the list of WASM modules used and Asmble-specific properties.
The text was updated successfully, but these errors were encountered: