[package] name = "socketcan" version = "3.3.1" edition = "2021" rust-version = "1.65" authors = [ "Marc Brinkmann ", "Frank Pagliughi " ] 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" 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"]