-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
55 lines (45 loc) · 1.63 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[package]
name = "nic-emu"
version = "0.0.1"
edition = "2021"
license = "MIT"
[profile.release]
lto = "fat"
codegen-units = 1
panic = "abort"
[lib]
crate-type = ["lib", "staticlib"]
[[bin]]
name = "nic-emu-cli"
required-features = ["build-binary"]
[features]
default = ["build-binary"]
build-binary = ["tun-tap", "polling", "clap", "macaddr", "ipnet", "timerfd", "libvfio-user"]
generate-bindings = ["cbindgen"]
[dependencies]
# Lib dependencies:
anyhow = "1.0.75"
packed_struct = "0.10.1"
internet-checksum = "0.2.1"
log = "0.4.20"
pretty_env_logger = "0.5.0" # Included in library too for setting up logs via FFI interface
# Bin dependencies:
# all marked as optional to allow for lib compilation without bin dependencies
tun-tap = { version = "0.1.4", default-features = false, features = ["libc"], optional = true } # Exclude default tokio feature
polling = { version = "3.3.2", optional = true }
clap = { version = "4.4.18", optional = true, features = ["derive"] }
macaddr = { version = "1.0.1", optional = true }
ipnet = { version = "2.9.0", optional = true }
timerfd = { version = "1.5.0", optional = true }
[dependencies.libvfio-user]
features = ["patch-dma-limit"]
optional = true
# Pick one:
# Latest git version of libvfio-user-rs
git = "https://github.com/vmuxIO/libvfio-user-rs.git"
rev = "a1cb90a5ab55626021f2128e57bc5ef7fc53f09b"
# Local development version, with libvfio-user-rs being in the same parent directory
#path = "../libvfio-user-rs/libvfio-user"
[build-dependencies]
# Exclude default clap feature which is only needed for the binary version of cbindgen
cbindgen = { version = "0.26.0", default-features = false, optional = true }