linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] libgpiod: Add Rust bindings
@ 2021-11-29 10:42 Viresh Kumar
  2021-11-29 10:42 ` [PATCH 1/2] libgpiod: Generate rust FFI bindings Viresh Kumar
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Viresh Kumar @ 2021-11-29 10:42 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Viresh Kumar, Vincent Guittot, linux-gpio, Kent Gibson,
	Miguel Ojeda, Wedson Almeida Filho, Alex Bennée, stratos-dev

Hi Bartosz,

This patch adds rust bindings for libgpiod v2.0, this is already partially
tested with the virtio rust backend I am developing, which uses these to talk to
the host kernel.

This is based of the next/post-libgpiod-2.0 branch.

I haven't added any mock test for this as of now and I am not sure how exactly
am I required to add them. I did see what you mentioned in your patchset about
mock-test vs gpio-sim stuff. Rust also have its own test-framework and I am not
sure if that should be used instead or something else.

Since I am posting this publicly for the first time, it is still named as V1. I
have not made significant changes to the code since last time, but just divided
the same into multiple files.

--
Viresh

Viresh Kumar (2):
  libgpiod: Generate rust FFI bindings
  libgpiod: Add rust wrappers

 .gitignore                          |   6 +
 bindings/rust/Cargo.toml            |  14 +
 bindings/rust/build.rs              |  60 ++++
 bindings/rust/src/bindings.rs       |  16 ++
 bindings/rust/src/chip.rs           | 197 +++++++++++++
 bindings/rust/src/edge_event.rs     |  78 +++++
 bindings/rust/src/event_buffer.rs   |  59 ++++
 bindings/rust/src/info_event.rs     |  70 +++++
 bindings/rust/src/lib.rs            | 268 +++++++++++++++++
 bindings/rust/src/line_config.rs    | 431 ++++++++++++++++++++++++++++
 bindings/rust/src/line_info.rs      | 186 ++++++++++++
 bindings/rust/src/line_request.rs   | 218 ++++++++++++++
 bindings/rust/src/request_config.rs | 118 ++++++++
 bindings/rust/wrapper.h             |   2 +
 14 files changed, 1723 insertions(+)
 create mode 100644 bindings/rust/Cargo.toml
 create mode 100644 bindings/rust/build.rs
 create mode 100644 bindings/rust/src/bindings.rs
 create mode 100644 bindings/rust/src/chip.rs
 create mode 100644 bindings/rust/src/edge_event.rs
 create mode 100644 bindings/rust/src/event_buffer.rs
 create mode 100644 bindings/rust/src/info_event.rs
 create mode 100644 bindings/rust/src/lib.rs
 create mode 100644 bindings/rust/src/line_config.rs
 create mode 100644 bindings/rust/src/line_info.rs
 create mode 100644 bindings/rust/src/line_request.rs
 create mode 100644 bindings/rust/src/request_config.rs
 create mode 100644 bindings/rust/wrapper.h

-- 
2.31.1.272.g89b43f80a514


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

end of thread, other threads:[~2021-12-01 11:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-29 10:42 [PATCH 0/2] libgpiod: Add Rust bindings Viresh Kumar
2021-11-29 10:42 ` [PATCH 1/2] libgpiod: Generate rust FFI bindings Viresh Kumar
2021-11-29 10:42 ` [PATCH 2/2] libgpiod: Add rust wrappers Viresh Kumar
2021-12-01 11:08 ` [PATCH 0/2] libgpiod: Add Rust bindings Bartosz Golaszewski
2021-12-01 11:20   ` 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).