As of now, the Rust bindings are only consumable as git dependencies (and even then come with some restrictions when wanting to control the build and linkage behaviour). This series does some (hopefully) cleanup and then proposes a change in how the Rust bindings are built and linked. Since the changes may require people hacking on the bindings to set some additional environment variables (at least if they want to avoid running make install), I am sending this as an RFC in order to hear opinions. For gpiosim-sys the situation is slightly more complex. Right now, libgpiosim installs without a pkg-config. If it is desireable to add one, that could be done and the same mechanism could be used. Otherwise, if packaging that lib is desirable (it looks like it?), we could either still query for libgpiod (and hope that the linker and include paths are matching) or need some other way to acquire the linker and include paths (and flags). So... The open questions: - Is this OK at all? Are people depending on this building against relative paths? - What to do with gpiosim-sys (see above)? - Is there interest into getting this published on crates.io after packaging is fixed? Signed-off-by: Erik Schilling <erik.schilling@xxxxxxxxxx> --- Erik Schilling (3): bindings: rust: drop legacy extern crate syntax bindings: rust: remove unneeded cc dependency bindings: rust: build against pkg-config info README | 13 ++++++++++- bindings/rust/libgpiod-sys/Cargo.toml | 5 ++++- bindings/rust/libgpiod-sys/build.rs | 42 ++++++++++++++++++++++------------- 3 files changed, 42 insertions(+), 18 deletions(-) --- base-commit: 0a51d62f060dbc1b036dfd45e52d4d90f0ce3eeb change-id: 20230522-crates-io-773a0b6b423d Best regards, -- Erik Schilling <erik.schilling@xxxxxxxxxx>