Registry / networking / socketcan

socketcan

JSON →
library3.6.1rscratesunverified

Linux SocketCAN library for sending and receiving CAN frames via CANbus.

# Cargo.toml [dependencies] socketcan = "3.6.1"
INSTALL
IMPORT
SIG · SOCKETCAN
S
socketcan
networkingrustv3.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CanSocket
use socketcan::CanSocket;

Open a CAN socket on interface can0.

use socketcan::CanSocket; fn main() -> Result<(), Box<dyn std::error::Error>> { let socket = CanSocket::open("can0", None)?; println!("Socket opened"); Ok(()) }
Debug
Known issues
gotchaOnly works on Linux with SocketCAN kernel support.
fix
Ensure your system has SocketCAN enabled and the appropriate CAN interface configured.
affects: >=3.0.0
Upgrade
Version history
3.6.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Amazon
1
OpenAI (training)
1
Resources
socketcan — cargo add socketcan · libregistry