* [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io
@ 2023-07-03 7:19 Erik Schilling
2023-07-03 7:19 ` [libgpiod][PATCH v2 1/2] bindings: rust: add README.md for libgpiod crate Erik Schilling
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Erik Schilling @ 2023-07-03 7:19 UTC (permalink / raw)
To: Linux-GPIO; +Cc: Viresh Kumar, Erik Schilling
The READMEs are displayed on crates.io for published crates. This tries
to provide a little more context there.
To: Linux-GPIO <linux-gpio@vger.kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
Changes in v2:
- Fixed typo (thanks Viresh!)
- Added missing sign-off to 2/2
- Link to v1: https://lore.kernel.org/r/20230630-rust-readme-v1-0-1ce9e6f7985c@linaro.org
---
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,
--
Erik Schilling <erik.schilling@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [libgpiod][PATCH v2 1/2] bindings: rust: add README.md for libgpiod crate
2023-07-03 7:19 [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io Erik Schilling
@ 2023-07-03 7:19 ` Erik Schilling
2023-07-03 7:20 ` [libgpiod][PATCH v2 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys Erik Schilling
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Erik Schilling @ 2023-07-03 7:19 UTC (permalink / raw)
To: Linux-GPIO; +Cc: Viresh Kumar, Erik Schilling
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
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
bindings/rust/libgpiod/README.md | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/bindings/rust/libgpiod/README.md b/bindings/rust/libgpiod/README.md
new file mode 100644
index 0000000..8d514e7
--- /dev/null
+++ b/bindings/rust/libgpiod/README.md
@@ -0,0 +1,25 @@
+<!--
+SPDX-License-Identifier: CC0-1.0
+SPDX-FileCopyrightText: 2023 Linaro Ltd.
+SPDX-FileCopyrightText: 2023 Erik Schilling <erik.schilling@linaro.org>
+-->
+
+# 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)
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [libgpiod][PATCH v2 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys
2023-07-03 7:19 [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io Erik Schilling
2023-07-03 7:19 ` [libgpiod][PATCH v2 1/2] bindings: rust: add README.md for libgpiod crate Erik Schilling
@ 2023-07-03 7:20 ` Erik Schilling
2023-07-03 7:22 ` [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io Viresh Kumar
2023-07-03 10:48 ` Bartosz Golaszewski
3 siblings, 0 replies; 5+ messages in thread
From: Erik Schilling @ 2023-07-03 7:20 UTC (permalink / raw)
To: Linux-GPIO; +Cc: Viresh Kumar, Erik Schilling
If 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
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
bindings/rust/libgpiod-sys/README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/bindings/rust/libgpiod-sys/README.md b/bindings/rust/libgpiod-sys/README.md
index f9db496..05acd9e 100644
--- a/bindings/rust/libgpiod-sys/README.md
+++ b/bindings/rust/libgpiod-sys/README.md
@@ -8,6 +8,9 @@ SPDX-FileCopyrightText: 2022 Viresh Kumar <viresh.kumar@linaro.org>
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.
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io
2023-07-03 7:19 [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io Erik Schilling
2023-07-03 7:19 ` [libgpiod][PATCH v2 1/2] bindings: rust: add README.md for libgpiod crate Erik Schilling
2023-07-03 7:20 ` [libgpiod][PATCH v2 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys Erik Schilling
@ 2023-07-03 7:22 ` Viresh Kumar
2023-07-03 10:48 ` Bartosz Golaszewski
3 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2023-07-03 7:22 UTC (permalink / raw)
To: Erik Schilling; +Cc: Linux-GPIO
On 03-07-23, 09:19, Erik Schilling wrote:
> The READMEs are displayed on crates.io for published crates. This tries
> to provide a little more context there.
>
> To: Linux-GPIO <linux-gpio@vger.kernel.org>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
>
> Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io
2023-07-03 7:19 [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io Erik Schilling
` (2 preceding siblings ...)
2023-07-03 7:22 ` [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io Viresh Kumar
@ 2023-07-03 10:48 ` Bartosz Golaszewski
3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2023-07-03 10:48 UTC (permalink / raw)
To: Erik Schilling; +Cc: Linux-GPIO, Viresh Kumar
On Mon, Jul 3, 2023 at 9:20 AM Erik Schilling <erik.schilling@linaro.org> wrote:
>
> The READMEs are displayed on crates.io for published crates. This tries
> to provide a little more context there.
>
> To: Linux-GPIO <linux-gpio@vger.kernel.org>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
>
> Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
> ---
> Changes in v2:
> - Fixed typo (thanks Viresh!)
> - Added missing sign-off to 2/2
> - Link to v1: https://lore.kernel.org/r/20230630-rust-readme-v1-0-1ce9e6f7985c@linaro.org
>
> ---
> 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,
> --
> Erik Schilling <erik.schilling@linaro.org>
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-03 10:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 7:19 [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io Erik Schilling
2023-07-03 7:19 ` [libgpiod][PATCH v2 1/2] bindings: rust: add README.md for libgpiod crate Erik Schilling
2023-07-03 7:20 ` [libgpiod][PATCH v2 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys Erik Schilling
2023-07-03 7:22 ` [libgpiod][PATCH v2 0/2] bindings: rust: add README for crates.io Viresh Kumar
2023-07-03 10:48 ` Bartosz Golaszewski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.