-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move non-essential code to utility crate(s) #20
Comments
On second thought and following a discussion with @andreeaflorescu, there's room for improvement in |
I would disagree with moving the utilities to vmm-sys-util unless those utilities are useful for other crates. I personally like the idea of locality which means that you define what you need to use as close as possible to where you use it. Otherwise we risk to have a super bloated vmm-sys-util for no good reason. With that in mind, how about we move the struct_util to vmm-sys-util. That one has the potential to be useful for other crates out there. For the cmdline I would like to keep it in linux-loader and potentially extend it to be somewhat smarter that what we have now. |
|
Oh, yes I agree. My proposal was to remove cmdline module and |
The linux loader crate purpose is to offer wrappers for loading kernels and other things related to it. The command line is one of the related things.
With rust-vmm we want to maximize the code that is shared between VMMs. Code in the vmm itself is usually purpose built for a use case and in most of the cases we expect it to not be shared. Related to arch, please take a look at #15 to see one approach to handle this. Regarding the memory, the linux loader takes a dependency only on the trait |
Alternative to moving |
Fixes rust-vmm#20 Closes rust-vmm/vmm-sys-util#77 Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
Fixes rust-vmm#20 Closes rust-vmm/vmm-sys-util#77 Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
Fixes rust-vmm#20 Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
Fixes rust-vmm#20 Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
Fixes rust-vmm#20 Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
Per @dianpopa's observation, theSee Move non-essential code to utility crate(s) #20 (comment).cmdline
module implements a generic utility that string formats key-value pairs onx86_64
. Onaarch64
, it passes on FDT info built elsewhere. This module is therefore not core kernel loading functionality and could live invmm-sys-util
.struct_util
module implements byte representation for structs. It's also a utility that could be moved tovmm-sys-util
.The text was updated successfully, but these errors were encountered: