Re: [PATCH 0/2] libgpiod: Add Rust bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01-12-21, 12:08, Bartosz Golaszewski wrote:
> Thanks for the hard work on that. Before I even dig into the patches
> themselves, I'd like to clarify a couple things (because I'm still not
> sure we're on the same page) and the projected timeline for v2.
> 
> #1. The v2 API is obviously not stable yet and we're still reworking
> certain structures (like line_config's accessors). This means I can't
> merge the bindings just yet but I'm fine with taking them in for v2
> given that the missing elements are added, which brings me to:
> 
> #2. If you look at the existing bindings, you'll notice they all have
> tests implemented. These tests use the combination of whatever testing
> framework was chosen for a given language and a wrapper around
> libgpio-mockup that allows to use the gpio-mockup kernel module to
> instantiate simulated GPIO devices. I'd like to see a comprehensive
> test suite for the rust bindings too before they get into the repo.
> Except that:

Yeah, I was able to get around that yesterday, while I was integrating rust's
build with Make and understood what we are doing for cpp and python.

For now, I dropped the idea of implementing rust tests, and wait for
you to go ahead with migrating the python/cpp ones to libgpiosim.

> #3. The development of other parts of the project is currently blocked
> by the gpio-sim development in the kernel. I don't want to reuse
> gpio-mockup in v2 because it's simply badly designed. Currently the
> v11 of the gpio-sim series[1] (based on configfs & sysfs) is on the
> list

I went into details of that as well yesterday, looked nice.

> and only once it lands in mainline, will we be able to advance
> the tests for the C, C++ and Python interfaces. This is when the rust
> tests should be developed too by following what other parts of
> libgpiod do: providing a wrapper around the future libgpiosim (a
> wrapper around gpio-sim configfs/sysfs interface that I'll implement
> once gpio-sim is in next) and then using whatever testing framework
> for rust is preferable.

Exactly.

> #4. This one is something you could already add at this time: other
> bindings contain the examples directory. Inside there are simplified
> reimplementations of the gpio-tools. It would be very useful for me
> (as someone not very fluent in rust) to see how those bindings are
> used in practice. Could you please add it?

Oh yes, sure. I can do that.

-- 
viresh



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux