linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libgpiod][PATCH 0/2] bindings: rust: add README for crates.io
@ 2023-06-30 10:46 Erik Schilling
  2023-06-30 10:46 ` [libgpiod][PATCH 1/2] bindings: rust: add README.md for libgpiod crate Erik Schilling
  2023-06-30 10:46 ` [libgpiod][PATCH 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys Erik Schilling
  0 siblings, 2 replies; 5+ messages in thread
From: Erik Schilling @ 2023-06-30 10:46 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>
---
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: 4510231c95a087f58a155cf74164e403e1e0584f
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 1/2] bindings: rust: add README.md for libgpiod crate
  2023-06-30 10:46 [libgpiod][PATCH 0/2] bindings: rust: add README for crates.io Erik Schilling
@ 2023-06-30 10:46 ` Erik Schilling
  2023-07-03  4:21   ` Viresh Kumar
  2023-06-30 10:46 ` [libgpiod][PATCH 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys Erik Schilling
  1 sibling, 1 reply; 5+ messages in thread
From: Erik Schilling @ 2023-06-30 10:46 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..4afd3d4
--- /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 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 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys
  2023-06-30 10:46 [libgpiod][PATCH 0/2] bindings: rust: add README for crates.io Erik Schilling
  2023-06-30 10:46 ` [libgpiod][PATCH 1/2] bindings: rust: add README.md for libgpiod crate Erik Schilling
@ 2023-06-30 10:46 ` Erik Schilling
  2023-07-03  4:22   ` Viresh Kumar
  1 sibling, 1 reply; 5+ messages in thread
From: Erik Schilling @ 2023-06-30 10:46 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
---
 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 1/2] bindings: rust: add README.md for libgpiod crate
  2023-06-30 10:46 ` [libgpiod][PATCH 1/2] bindings: rust: add README.md for libgpiod crate Erik Schilling
@ 2023-07-03  4:21   ` Viresh Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2023-07-03  4:21 UTC (permalink / raw)
  To: Erik Schilling; +Cc: Linux-GPIO

On 30-06-23, 12:46, Erik Schilling wrote:
> 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..4afd3d4
> --- /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 provides an easy to use abstraction over the Linux GPIO character

                 ^ that ?

> +driver. This crate builds on top of `libgpiod-sys` and exports a safe interface
> +to the C library.

-- 
viresh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [libgpiod][PATCH 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys
  2023-06-30 10:46 ` [libgpiod][PATCH 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys Erik Schilling
@ 2023-07-03  4:22   ` Viresh Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2023-07-03  4:22 UTC (permalink / raw)
  To: Erik Schilling; +Cc: Linux-GPIO

On 30-06-23, 12:46, Erik Schilling wrote:
> 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
> ---
>  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.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-03  4:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-30 10:46 [libgpiod][PATCH 0/2] bindings: rust: add README for crates.io Erik Schilling
2023-06-30 10:46 ` [libgpiod][PATCH 1/2] bindings: rust: add README.md for libgpiod crate Erik Schilling
2023-07-03  4:21   ` Viresh Kumar
2023-06-30 10:46 ` [libgpiod][PATCH 2/2] bindings: rust: mention the libgpiod crate from libgpiod-sys Erik Schilling
2023-07-03  4:22   ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).