vm-allocator: Enable build with kvm feature

Currently `vm-allocator` module cannot be solely built, by add
`features` section and specifying `arch/kvm` to turn on the features
required for its dependency - `arch` module to build. Thus enabling
`vm-allocator` crate to be built and tested with command:

```sh
cargo build -p vm-allocator --features kvm
```

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He 2024-12-04 16:25:47 +08:00 committed by Rob Bradford
parent 6b57f301db
commit 1e602bd9a6

View File

@ -4,6 +4,10 @@ edition = "2021"
name = "vm-allocator" name = "vm-allocator"
version = "0.1.0" version = "0.1.0"
[features]
default = []
kvm = ["arch/kvm"]
[dependencies] [dependencies]
libc = "0.2.167" libc = "0.2.167"
vm-memory = { workspace = true } vm-memory = { workspace = true }