Re: [PATCH V2 1/4] libgpiod: Generate rust FFI bindings

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

 



On 17-12-2021, 3:50 PM, Viresh Kumar wrote:
> followed by wrapper crate to contain the wrappers around it.

If by wrapper you mean the safe/idiomatic wrapper then I agree.

> When I do a cargo build there (for vhost-device crate), it will try to build the
> dependencies as well, i.e. libgpiod, and I need to build the libgpiod's C files
> as well there. There are good chances that I need to build from source and
> libgpiod isn't installed there. How do I do it with Make ?

Hmmm, I was thinking `pkg-config` or make from this repo would be enough.
I haven't used it myself as I don't do much c/cpp work anymore, but
I've looked into https://vcpkg.io/ seems quite good.
and there is https://crates.io/crates/vcpkg to integrate it.
for now, perhaps `cc` is enough.

On 17-12-2021, 8:49 PM, Viresh Kumar wrote:
> Perhaps, we should make it compile-only for the time being. Once the ABI is
> stable enough, we can think of committing something to the source tree.

Sounds good.

On Fri, Dec 17, 2021 at 8:49 PM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> On 17-12-21, 11:38, Miguel Ojeda wrote:
> > Having optional pre-generated bindings may be good for some users,
> > e.g. libsqlite3-sys does it. I guess the main question is whether you
> > are willing to support/maintain it. Also consider cross-compilation.
> >
> > But I wouldn't only provide pre-generated ones if you are using
> > `bindgen` anyway.
>
> The pre-generated ones are normally good for kernel headers, where the userspace
> ABI is stable and so we don't need to change the generated bindings soon.
>
> But in our case here, the ABI isn't that stable and will likely change soon
> again for the first few months after v2.0 is released for libgpiod.
>
> Perhaps, we should make it compile-only for the time being. Once the ABI is
> stable enough, we can think of committing something to the source tree.
>
> > In any case, I am not a Rust expert, so please take that with a grain of salt :)
>
> :)
>
> --
> 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