On Tue, Aug 2, 2022 at 2:18 PM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote: > > Hello, > > Here is another version of rust bindings for libgpiod v2.0, based of the > next/libgpiod-2.0. > > Pushed here: > > https://github.com/vireshk/libgpiod master > > Kent, I hope I haven't missed any of your comments, there were too many of them. > Thanks for your review. > Hey Viresh et al. Thank you for your hard work on that, we'll get it merged eventually. :) I'm just letting you know that I am following the discussion. I sadly don't know Rust well enough to be able to review the patches in detail but from looking at the code, I can tell that you followed the C++ bindings in how line-config works. Looking at how line configuration works in C++ and Rust bindings and how I struggle to translate it well to Python, I decided to take one step back and revisit the line config in core C API. My goal is to tweak the data model in a way that - while making the C API slightly more complex - will allow high-level bindings to expose more elegant interfaces using mutator chaining (like what is customary in Rust and what is also possible and often used in C++ and Python) while reducing the usage of quasi dynamic typing using std::any in C++. I wanted to post my work this week but didn't manage to finish it and now I'm leaving for vacation. If you want to take a look, the C part is done and available here: https://github.com/brgl/libgpiod-private/tree/topic/rebuild-line-config. C++ part is in progress. I hope you won't mind some more reworks to the Rust API but I'm sure it will be much better in the end and more like what Rust libraries typically look like. Bart