The vmm crate hosts most of the modules that implement the Firecracker functionality. Moreover, at its "top-level", mainly lib.rs and builder.rs includes the logic for creating the Vmm the object that describes a Firecracker microVM. The logic for creating Vmm objects is divided between lib.rs and builder.rs. Moreover, this functionality includes a lot of architecture specific code that has been gathered along the years to a code-base the logic of which is hard to follow "sometimes".
Action Items
A nice way to refactor this (and hopefully make it less painful to follow), would be to isolate the logic for building the Vmm in its own module and isolate the architecture specific code in their own sub-modules, one for each architecture.
Acceptance criteria
Do the refactoring. Focus only on the logic related with the building the Vmm object
Ensure that we didn't break something along the way (all the tests are still passing after the refactor).
Description
The
vmm
crate hosts most of the modules that implement the Firecracker functionality. Moreover, at its "top-level", mainlylib.rs
andbuilder.rs
includes the logic for creating theVmm
the object that describes a Firecracker microVM. The logic for creatingVmm
objects is divided betweenlib.rs
andbuilder.rs
. Moreover, this functionality includes a lot of architecture specific code that has been gathered along the years to a code-base the logic of which is hard to follow "sometimes".Action Items
A nice way to refactor this (and hopefully make it less painful to follow), would be to isolate the logic for building the
Vmm
in its own module and isolate the architecture specific code in their own sub-modules, one for each architecture.Acceptance criteria
Vmm
object