forked from socketcan-rs/socketcan-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
114 lines (97 loc) · 2.64 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[package]
name = "socketcan"
version = "3.4.0-pre.0"
edition = "2021"
rust-version = "1.65"
authors = [
"Marc Brinkmann <git@marcbrinkmann.de>",
"Frank Pagliughi <fpagliughi@mindspring.com>"
]
documentation = "https://docs.rs/socketcan"
repository = "https://github.com/mbr/socketcan-rs"
license = "MIT"
description = """
Linux SocketCAN library. Send and receive CAN frames via CANbus on Linux.
"""
# Features:
#
# "netlink" (default) - Whether to include CAN interface configuration
# capabilities based on netlink kernel communications
# "dump" (default) - Whether to include 'candump' output parsing
# capabilities.
# "utils" - Build the command-line utilities
#
[features]
default = ["netlink", "dump"]
netlink = ["neli"]
dump = []
netlink_tests = ["netlink"]
vcan_tests = ["netlink"]
utils = ["clap", "anyhow"]
tokio = ["dep:tokio", "mio", "futures"]
async-std = ["dep:async-std", "dep:async-io"]
[dependencies]
embedded-can = "0.4"
nb = "1"
log = "0.4"
byte_conv = "0.1.1"
hex = "0.4"
itertools = "0.10"
libc = "0.2"
nix = "0.26"
bitflags = "1.3"
thiserror = "1.0"
socket2 = { version = "0.5", features = ["all"] }
clap = { version = "4.2", optional = true }
anyhow = { version = "1.0", optional = true }
neli = { version = "0.6", optional = true }
tokio = { version = "1", features = ["net"], optional = true }
mio = { version = "0.8", features = ["os-ext"], optional = true }
futures = { version = "0.3", optional = true }
async-io = { version = "1.13", optional = true }
smol = { version = "1.3", optional = true }
async-std = { version = "1.12", optional = true }
[dev-dependencies]
anyhow = "1.0"
ctrlc = "3.2.2"
nb = "1.0"
# TODO: Is it possible to only include these for async builds?
futures-timer = "0.3"
futures-util = "0.3"
serial_test = { version = "2.0", features = ["async"]}
async-std = { version = "1.12", features = ["attributes"]}
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync"] }
futures = "0.3"
[[bin]]
name = "rcan"
required-features = ["utils"]
[[example]]
name = "tokio_send"
required-features = ["tokio"]
[[example]]
name = "tokio_bridge"
required-features = ["tokio"]
[[example]]
name = "tokio_print_frames"
required-features = ["tokio"]
[[example]]
name = "tokio_average"
required-features = ["tokio"]
[[example]]
name = "smol_send"
required-features = ["smol"]
[[example]]
name = "smol_bridge"
required-features = ["smol"]
[[example]]
name = "smol_print_frames"
required-features = ["smol"]
[[example]]
name = "async_std_send"
required-features = ["async-std"]
[[example]]
name = "async_std_bridge"
required-features = ["async-std"]
[[example]]
name = "async_std_print_frames"
required-features = ["async-std"]