-
Notifications
You must be signed in to change notification settings - Fork 148
/
Cargo.toml
83 lines (72 loc) · 1.92 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[package]
name = "tun"
version = "0.7.5"
edition = "2021"
authors = ["meh. <[email protected]>", "@ssrlive"]
license = "WTFPL"
description = "TUN device creation and handling."
repository = "https://github.com/meh/rust-tun"
keywords = ["tun", "network", "tunnel", "bindings"]
[lib]
crate-type = ["staticlib", "cdylib", "lib"]
[dependencies]
bytes = { version = "1" }
cfg-if = "1"
futures-core = { version = "0.3", optional = true }
libc = { version = "0.2", features = ["extra_traits"] }
log = "0.4"
thiserror = "2"
tokio = { version = "1", features = [
"net",
"macros",
"io-util",
], optional = true }
tokio-util = { version = "0.7", features = ["codec"], optional = true }
[target.'cfg(unix)'.dependencies]
nix = { version = "0.29", features = ["ioctl"] }
[target.'cfg(target_os = "windows")'.dependencies]
futures = { version = "0.3", optional = true }
windows-sys = { version = "0.59", features = [
"Win32_Foundation",
"Win32_Security",
"Win32_Security_WinTrust",
"Win32_Security_Cryptography",
"Win32_System_Threading",
"Win32_UI_WindowsAndMessaging",
"Win32_System_LibraryLoader",
] }
wintun-bindings = { version = "^0.7.7", features = [
"panic_on_unsent_packets",
"verify_binary_signature",
"async",
] }
[target.'cfg(any(target_os = "macos", target_os = "freebsd"))'.dependencies]
ipnet = "2"
[dev-dependencies]
ctrlc2 = { version = "3", features = ["tokio", "termination"] }
env_logger = "0.11"
futures = "0.3"
packet = "0.1"
serde_json = "1"
tokio = { version = "1", features = ["rt-multi-thread"] }
[features]
default = []
# default = ["async"]
async = [
"tokio",
"futures-core",
"futures",
"tokio-util",
"wintun-bindings/async",
]
[package.metadata.docs.rs]
features = ["async"]
[[example]]
name = "read-async"
required-features = ["async"]
[[example]]
name = "read-async-codec"
required-features = ["async"]
[[example]]
name = "ping-tun"
required-features = ["async"]