| Crates.io | host-can |
| lib.rs | host-can |
| version | 0.1.4 |
| created_at | 2025-10-29 15:16:50.892572+00 |
| updated_at | 2026-01-20 01:32:33.422359+00 |
| description | Host library for CAN adapters |
| homepage | |
| repository | https://gitlab.com/mfairman/host-can |
| max_upload_size | |
| id | 1906787 |
| size | 92,927 |
A library for talking to CAN adapters on different platforms (MacOS via PCANBasic and Linux via socketcan currently).
NOTE: this is an early development version and APIs are not yet stabilized.
Adapter::recv() with a timeout will consume excess CPU cyclesAdd host-can to your project, specifying the pcan (MacOS) or socketcan
(Linux) feature:
cargo add host-can --features=<pcan | socketcan>
See the tests/ directory for example code.
Async APIs
CanFD support
Timestamp support
Adapter-specific APIs for device control/queries
Handle adapter disconnect/reconnect
Optimize windows adapter read timeout logic
More tests / docs / examples