-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
73 lines (61 loc) · 2.15 KB
/
Cargo.toml
File metadata and controls
73 lines (61 loc) · 2.15 KB
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
[package]
name = "riptun"
version = "0.1.4"
edition = "2018"
description = "riptun is a cross platform library for creating, managing, and leveraging both sync and async TUN/TAP devices."
license = "MIT"
repository = "https://github.com/csaide/riptun"
authors = ["Christian Saide"]
exclude = [
".github/*",
"dist/*",
".dockerignore",
".devcontainer.json",
"codecov.yaml",
]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# Generic required dependencies.
cfg-if = "1.0.0"
nix = "0.23.0"
thiserror = "1.0.28"
# Async specific dependencies, see the features bellow to determine when they are included.
async-io = { version = "1.0.1", optional = true }
futures-util = { version = "0.3.17", optional = true }
futures-io = { version = "0.3.17", optional = true }
mio = { version = "0.7", optional = true, default-features = false, features = ["os-ext"] }
tokio = { version = "1.12.0", optional = true, default-features = false, features = ["net"] }
# Example only dependencies, these are never included in the final library builds.
async-std = { version = "1.10.0", optional = true }
smol = { version = "1.2.5", optional = true }
[features]
# Default feature set is to enable all async capabilities.
default = ["mio-impl", "async-std-impl", "tokio-impl"]
# Enable/disable individual async implementations.
mio-impl = ["mio"]
async-std-impl = ["async-io", "futures-util", "futures-io"]
tokio-impl = ["tokio", "futures-util", "futures-io"]
# Strictly for examples.
async-std-example = ["async-std/attributes", "async-std/default", "async-std-impl", ]
tokio-example = ["tokio/rt", "tokio/rt-multi-thread", "tokio/macros", "tokio-impl"]
smol-example = ["smol", "async-std-impl"]
[[example]]
name = "sync"
path = "examples/sync.rs"
required-features = []
[[example]]
name = "mio"
path = "examples/mio.rs"
required-features = ["mio-impl"]
[[example]]
name = "smol"
path = "examples/smol.rs"
required-features = ["smol-example"]
[[example]]
name = "std"
path = "examples/std.rs"
required-features = ["async-std-example"]
[[example]]
name = "tokio"
path = "examples/tokio.rs"
required-features = ["tokio-example"]