# libgpiod in Rust
[](https://github.com/katyo/gpiod-rs)
[](https://crates.io/crates/gpiod-core)
[](https://docs.rs/gpiod-core)
[](https://opensource.org/licenses/MIT)
[](https://github.com/katyo/gpiod-rs/actions?query=workflow%3ARust)
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](https://man7.org/linux/man-pages/man2/ioctl.2.html) funcions which are unsafe and require some unintuitive variable mapping.
The functionality provided here is highly inspired by [libgpiod](https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/).
Since all functionality is dependent on Linux function calls, this crate only compiles for Linux systems.
## ABI compatibility
Both v1 (>= 4.0) and v2 (>= v5.10) ABI currently supported but edge detection implemented for v2 only.
Sysfs-based API (< 4.0) does not supported.
## Crates
- **[gpiod-core](https://crates.io/crates/gpiod-core)** - core abstractions and low level interface (not for end users)
- [gpiod](https://crates.io/crates/gpiod) - sync interface which supports synchronous operation only
- [tokio-gpiod](https://crates.io/crates/tokio-gpiod) - async interface for [tokio](https://tokio.rs/) fans
- [async-std-gpiod](https://crates.io/crates/async-std-gpiod) - async interface for [async-std](https://async.rs/) fans