From 97421f754d8d38508687926b5045c4ed1bd6c107 Mon Sep 17 00:00:00 2001 From: Liu Jiang Date: Fri, 19 Feb 2021 19:21:17 +0800 Subject: Upgrade to rust 2018 edition Upgrade Cargo.toml to rust edition 2018. Also introduce a helper feature flag "vhost-user" to simplify code. Signed-off-by: Liu Jiang --- Cargo.toml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 8c676b3..b8609f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,13 +4,15 @@ version = "0.1.0" authors = ["Liu Jiang "] repository = "https://github.com/rust-vmm/vhost" license = "Apache-2.0 or BSD-3-Clause" +edition = "2018" [features] default = [] vhost-vsock = [] vhost-kern = ["vm-memory"] -vhost-user-master = [] -vhost-user-slave = [] +vhost-user = [] +vhost-user-master = ["vhost-user"] +vhost-user-slave = ["vhost-user"] [dependencies] bitflags = ">=1.0.1" @@ -18,3 +20,6 @@ libc = ">=0.2.39" vmm-sys-util = ">=0.3.1" vm-memory = { version = "0.2.0", optional = true } + +[dev-dependencies] +vm-memory = { version = "0.2.0", features=["backend-mmap"] } -- cgit v1.2.3