5 releases

0.3.0 May 11, 2024
0.2.3 Jan 21, 2023
0.2.2 Oct 15, 2022
0.2.1 Sep 15, 2022
0.2.0 Jul 31, 2022

#6 in #libgpiod

Download history 1041/week @ 2024-08-21 852/week @ 2024-08-28 1127/week @ 2024-09-04 1178/week @ 2024-09-11 1557/week @ 2024-09-18 1507/week @ 2024-09-25 1028/week @ 2024-10-02 1890/week @ 2024-10-09 1223/week @ 2024-10-16 1555/week @ 2024-10-23 1895/week @ 2024-10-30 1599/week @ 2024-11-06 1685/week @ 2024-11-13 1921/week @ 2024-11-20 1525/week @ 2024-11-27 1585/week @ 2024-12-04

7,028 downloads per month
Used in 6 crates (4 directly)

MIT license

69KB
2K SLoC

libgpiod in Rust

github crate docs MIT CI

Rust crate for interfacing with Linux GPIO character devices.

It provides an interface to the Linux GPIO using the chardev module. This interface involves calling ioctl funcions which are unsafe and require some unintuitive variable mapping. The functionality provided here is highly inspired by libgpiod.

Since all functionality is dependent on Linux function calls, this crate only compiles for Linux systems.

ABI compatibility

Both ABI v1 (linux >= 4.0) and v2 (linux >= v5.10) supported but edge detection implemented for v2 only. Deprecated sysfs-based API (linux < 4.0) currently is not supported at all.

Crates

  • gpiod-core - core abstractions and low level interface (not for end users)
  • gpiod - sync interface which supports synchronous operation only
  • tokio-gpiod - async interface for tokio fans
  • async-gpiod - async interface to use with non-tokio async runtimes

Dependencies

~2MB
~41K SLoC