Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Linux SocketCAN access in Rust

License

NotificationsYou must be signed in to change notification settings

socketcan-rs/socketcan-rs

Repository files navigation

This library allows Controller Area Network (CAN) communications on Linux using the SocketCAN interfaces. This provides a network socket interface to the CAN bus.

Linux SocketCAN

Please see thedocumentation for details about the Rust API provided by this library.

Latest News

Version 2.0 is finally released!

What's New in v2.0

The v2.0 release is a fairly large rewrite of the library and adds the following features:

  • CAN Flexible Data Rate (FD) support
  • Proper handling of Extended CAN IDs
  • Integration with the Rust Embedded HAL APIs for CAN
  • Some control of the CAN network interfaces via netlink with theneli crate.
  • Tighter integration withlibc andnix crates, including changes we pushed upstream to support SocketCAN
  • Update to Rust Edition 2021, with updates to the dependencies.
  • Update error types conforming tostd::error::Error
  • Distinct separate frame types:
    • CanDataFrame,CanRemoteFrame,CanErrorFrame, andCanFdFrame
    • Enum wrapper typesCanFrame for the classic 2.0 frames andCanAnyFrame for any type of frame including the larger FD frames
  • Updated documentation
  • Targeting Rust Edition 2021 w/ MSRV 1.64.0

Next Steps

A number of items did not make it into the 2.0 release. These will be added in a follow-up v2.1, coming soon.

  • Issue#22 Timestamps, including optional hardware timestamps
  • Issue#32 Better coverage of the Netlink API to manipulate the CAN interfaces programatically.
  • Better documentation. This README will be expanded with basic usage information, along with better doc comments, and perhaps creation of the wiki

We will also start looking into support of Rust async/await, prefereably in a portable way without lying on a particular library/executor. But certainly support for the main ones like Tokio would be the goal. Some folks have suggested putting this into a separate wrapper crate, but it would be better to add it here for convenience, but certainly made optional through a Cargo build feature.

Minimum Supported Rust Version (MSRV)

The current version of the crate targets Rust Edition 2021 with an MSRV of Rust v1.64.0.

Note that, at this time, the MSRV is mostly diven by use of theclap v4.0 crate for managing command-line parameters in the utilities and example applications. The core library could likely be built with an earlier version of the compiler if required.

About

Linux SocketCAN access in Rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors21


[8]ページ先頭

©2009-2025 Movatter.jp