bindings: rust: add README for crates.io
v2 cover bindings: rust: add README for crates.io
The READMEs are displayed on crates.io for published crates. This tries to provide a little more context there.
To: Linux-GPIO <[email protected]>
Cc: Viresh Kumar <[email protected]>
---
Changes in v2:
- Fixed typo (thanks Viresh!)
- Added missing sign-off to 2/2
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Erik Schilling (2):
bindings: rust: add README.md for libgpiod crate
bindings: rust: mention the libgpiod crate from libgpiod-sys
bindings/rust/libgpiod-sys/README.md | 3 +++ bindings/rust/libgpiod/README.md | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+)
---
base-commit: 37b3ac4bb5a35c0e84a98d95124f064ca038c4d1
change-id: 20230630-rust-readme-6560244a713d
Best regards,
Signature · 1 line
Erik Schilling <[email protected]>
PATCH v2 1/2 bindings: rust: add README.md for libgpiod crate
crates.io treats the README as landing page for a crate [1]. Since we have none, it currently displays a blank page. Lets add at least a little bit of info here so people can figure out what they are dealing with.
[1] https://crates.io/crates/libgpiod
--- bindings/rust/libgpiod/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
bindings/rust/libgpiod/README.md new file +25 -0
@@ -0,0 +1,25 @@ +<!-- +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2023 Linaro Ltd. +SPDX-FileCopyrightText: 2023 Erik Schilling <[email protected]> +--> + +# Safe wrapper around Rust FFI bindings for libgpiod + +[libgpiod](https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/README) +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. + +## License + +This project is licensed under either of + +- [Apache License](http://www.apache.org/licenses/LICENSE-2.0), Version 2.0 +- [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause)
Signature · 1 line
2.41.0
PATCH v2 2/2 bindings: rust: mention the libgpiod crate from libgpiod-sys
In reply to Erik SchillingIf people view this README.md on crates.io [1], they likely want to use the safe wrapper instead. So this hints the existence of that other crate.
[1] https://crates.io/crates/libgpiod-sys
--- bindings/rust/libgpiod-sys/README.md | 3 +++ 1 file changed, 3 insertions(+)
bindings/rust/libgpiod-sys/README.md +3 -0
@@ -8,6 +8,9 @@ SPDX-FileCopyrightText: 2022 Viresh Kumar <[email protected]> Automatically generated Rust FFI bindings via [bindgen](https://github.com/rust-lang/rust-bindgen). +Typically, you will want to use the safe `libgpiod` wrapper crate instead of +these unsafe wrappers around the C lib. + ## Build requirements A compatible variant of the C library needs to detectable using pkg-config.
Signature · 1 line
2.41.0
Quoted 7 lines · Erik Schilling
The READMEs are displayed on crates.io for published crates. This tries to provide a little more context there.
To: Linux-GPIO <[email protected]>
Cc: Viresh Kumar <[email protected]>Signed-off-by Erik Schilling <[email protected]>
Signature · 1 line
viresh
Bartosz Golaszewski
AppliedQuoted 22 lines · Erik Schilling
The READMEs are displayed on crates.io for published crates. This tries to provide a little more context there.
To: Linux-GPIO <[email protected]>
Cc: Viresh Kumar <[email protected]>Signed-off-by Erik Schilling <[email protected]>---
Changes in v2:
- Fixed typo (thanks Viresh!)
- Added missing sign-off to 2/2
- Link to v1: https://lore.kernel.org/r/[email protected]---
Erik Schilling (2):
bindings: rust: add README.md for libgpiod crate
bindings: rust: mention the libgpiod crate from libgpiod-sysbindings/rust/libgpiod-sys/README.md | 3 +++ bindings/rust/libgpiod/README.md | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+)
Quoted 8 lines
---
base-commit:37b3ac4bb5a35c0e84a98d95124f064ca038c4d1
change-id: 20230630-rust-readme-6560244a713dBest regards,
--
Erik Schilling <[email protected]>
Applied, thanks!
Bart