mbox series

[libgpiod,v2,0/2] bindings: rust: allow packaging of libgpiod-sys

Message ID 20230522-crates-io-v2-0-d8de75e7f584@linaro.org
Headers show
Series bindings: rust: allow packaging of libgpiod-sys | expand

Message

Erik Schilling May 26, 2023, 3:27 p.m. UTC
As of now, the Rust bindings are only consumable as git dependencies
(and even then come with some restrictions when wanting to control
the build and linkage behaviour).

This series does some cleanup and then proposes a change in how the Rust
bindings are built and linked in order to prepare libgpiod-sys (and thus
also libgpiod) for being packageable via `cargo package` (which is a
prerequisite for eventually publishing to crates.io).

Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
Changes in v2:
- Added wrapper.h that I forgot in v1 (Thanks Viresh!)
- Rebased on top of the commits that already got merged as part of v1
- Automatically set the right flags when using `make`
- Tweaked the docs (setting the flags is now done automatically, so it
  is not as important anymore)
- Link to v1: https://lore.kernel.org/r/20230522-crates-io-v1-0-42eeee775eb6@linaro.org

---
Erik Schilling (2):
      rust: bindings: turn SPDX tags into comments
      bindings: rust: build against pkg-config info

 README                                |  4 +++-
 bindings/rust/gpiosim-sys/README.md   |  8 ++++---
 bindings/rust/libgpiod-sys/Cargo.toml |  4 ++++
 bindings/rust/libgpiod-sys/README.md  | 16 +++++++++++---
 bindings/rust/libgpiod-sys/build.rs   | 40 +++++++++++++++++++++++------------
 bindings/rust/libgpiod-sys/wrapper.h  |  1 +
 bindings/rust/libgpiod/Makefile.am    |  8 ++++++-
 7 files changed, 59 insertions(+), 22 deletions(-)
---
base-commit: 4687bcc4f48a9894469ee240e0c67c42d56169c3
change-id: 20230522-crates-io-773a0b6b423d

Best regards,

Comments

Viresh Kumar May 29, 2023, 5:01 a.m. UTC | #1
On 26-05-23, 17:27, Erik Schilling wrote:
> As of now, the Rust bindings are only consumable as git dependencies
> (and even then come with some restrictions when wanting to control
> the build and linkage behaviour).
> 
> This series does some cleanup and then proposes a change in how the Rust
> bindings are built and linked in order to prepare libgpiod-sys (and thus
> also libgpiod) for being packageable via `cargo package` (which is a
> prerequisite for eventually publishing to crates.io).
> 
> Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
> ---
> Changes in v2:
> - Added wrapper.h that I forgot in v1 (Thanks Viresh!)
> - Rebased on top of the commits that already got merged as part of v1
> - Automatically set the right flags when using `make`
> - Tweaked the docs (setting the flags is now done automatically, so it
>   is not as important anymore)
> - Link to v1: https://lore.kernel.org/r/20230522-crates-io-v1-0-42eeee775eb6@linaro.org
> 
> ---
> Erik Schilling (2):
>       rust: bindings: turn SPDX tags into comments
>       bindings: rust: build against pkg-config info
> 
>  README                                |  4 +++-
>  bindings/rust/gpiosim-sys/README.md   |  8 ++++---
>  bindings/rust/libgpiod-sys/Cargo.toml |  4 ++++
>  bindings/rust/libgpiod-sys/README.md  | 16 +++++++++++---
>  bindings/rust/libgpiod-sys/build.rs   | 40 +++++++++++++++++++++++------------
>  bindings/rust/libgpiod-sys/wrapper.h  |  1 +
>  bindings/rust/libgpiod/Makefile.am    |  8 ++++++-
>  7 files changed, 59 insertions(+), 22 deletions(-)

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