On 5/26/23 10:36, Bartosz Golaszewski wrote:
On Fri, 26 May 2023 at 10:30, Erik Schilling <erik.schilling@xxxxxxxxxx> wrote:
I am not exactly sure if I understood the above comment correctly. But
if we want to eventually be able to consume gpiosim-sys via crates.io
(or any packaging mechanism that relies on cargo package), then we will
need to decouple the header and .so file referencing in a similar way.
The easiest solution for me seems to be to just add a pkg-config file
for gpiosim and use the same mechanism that I sketched for libgpiod-sys
here.
Yes we would like to get gpiosim via crates.io as well.
Would simply adding a pkg-config for the gpiosim C lib be desirable?
Then we can use the same mechanism. There is none existing at the
moment. I am not sure whether that is intentional or just not done yet.
@Bartosz: Viresh said on IRC that I should ask you about this :). Shall
I just add a pkg-config for gpiosim? Or is that not desired for some reason?
libgpiosim was not meant to be installed for development, that's why
there's no pkg-config for it. We don't install the header and only
install the shared object if tests are enabled but with the
expectation that the tests were built in-tree.
Ah. Did not catch that the header is not installed.
I also don't quite get why we'd want to get gpiosim via crates.io - I
would prefer to use the one in the tree. Or am I not understanding
something here right?
I am also only seeing the libgpiod package using it as dev-dependency.
If that is the only consumer and we do not want to expose it to
out-of-tree things then that should be fine and we can keep building
that one against the "in-tree" artifacts for it.
@Viresh: Could you comment on the use-case that you had in mind with
gpiosim being on crates.io? I am not seeing any good options to package
it if it is only intended as an testing tool for in-tree things.
- Erik