4 releases

0.2.2 Nov 21, 2023
0.2.1 Oct 11, 2023
0.2.0 Oct 5, 2023
0.1.0 Jun 13, 2023

#324 in Unix APIs

Download history 594/week @ 2024-07-24 715/week @ 2024-07-31 701/week @ 2024-08-07 444/week @ 2024-08-14 286/week @ 2024-08-21 854/week @ 2024-08-28 809/week @ 2024-09-04 707/week @ 2024-09-11 1092/week @ 2024-09-18 1410/week @ 2024-09-25 929/week @ 2024-10-02 1085/week @ 2024-10-09 1152/week @ 2024-10-16 896/week @ 2024-10-23 973/week @ 2024-10-30 939/week @ 2024-11-06

4,153 downloads per month
Used in vhost-device-gpio

Apache-2.0 OR BSD-3-Clause

85KB
1.5K SLoC

Safe wrapper around Rust FFI bindings for libgpiod

libgpiod is a C library that provides an easy to use abstraction over the Linux GPIO character driver. This crate builds on top of libgpiod-sys and exports a safe interface to the C library.

Build requirements

By default, libgpiod-sys builds against the libgpiod version identified via pkg-config. See the README.md of libgpiod-sys for options to override that.

Currently at least libgpiod 2.0 is required with the default feature set.

Features

The Rust bindings will usually be built against whatever libgpiod version a system provides. Hence, only the functionality of the oldest supported libgpiod C library will be exposed by default.

Setting flags allows to increase the base version and export features of newer versions:

  • v2_1: Minimum version of 2.1.x
  • vnext: The upcoming, still unreleased version of the C lib

License

This project is licensed under either of

Dependencies

~1.3–3.5MB
~75K SLoC