firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

Move part of `utils` into `vmm`

Open ShadowCurse opened this issue 6 months ago • 1 comments

Changes

  • Move vmm related parts of utils into vmm.
  • Remove reexport of vmm_sys_utils

Reason

utils crate contained a bunch of helper functions/structs, but most of them were only used by vmm crate, so the coupling between these 2 crates was very high. This created an issue where if we want to add some utility function/struct to use in vmm, we need to add it instead to the utils crate, because vmm by itself does not have utils module. (not including utilities which only contain testing code). By moving part of utils into vmm/utils we remove vmm dependency on utils and make it easier to add/modify utility functions/structs in vmm. Additionally we can remove reexporting of vmm_sys_utils from both utils and vmm/utils. This helps with core readability as now there is only 1 place to import vmm_sys_utils items from: the vmm_sys_utils crate itself.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check CONTRIBUTING.md.

PR Checklist

  • [ ] If a specific issue led to this PR, this PR closes the issue.
  • [ ] The description of changes is clear and encompassing.
  • [ ] Any required documentation changes (code and docs) are included in this PR.
  • [ ] API changes follow the Runbook for Firecracker API changes.
  • [ ] User-facing changes are mentioned in CHANGELOG.md.
  • [ ] All added/changed functionality is tested.
  • [ ] New TODOs link to an issue.
  • [ ] Commits meet contribution quality standards.

  • [ ] This functionality cannot be added in rust-vmm.

ShadowCurse avatar Aug 14 '24 09:08 ShadowCurse