From 1e602bd9a6911b7326e8ed6c44239a101a87f758 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Wed, 4 Dec 2024 16:25:47 +0800 Subject: [PATCH] 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 --- vm-allocator/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vm-allocator/Cargo.toml b/vm-allocator/Cargo.toml index 2782bb7d7..1cc0ae9e1 100644 --- a/vm-allocator/Cargo.toml +++ b/vm-allocator/Cargo.toml @@ -4,6 +4,10 @@ edition = "2021" name = "vm-allocator" version = "0.1.0" +[features] +default = [] +kvm = ["arch/kvm"] + [dependencies] libc = "0.2.167" vm-memory = { workspace = true }