open-quantum-safe / liboqs-rust

Rust bindings for liboqs
https://openquantumsafe.org/
Apache License 2.0
121 stars 48 forks source link

Allow finding and linking system deps #211

Closed tranzystorekk closed 1 year ago

tranzystorekk commented 1 year ago

Addresses #190

Adds necessary changes to optionally detect the system liboqs version and link to it.

To consider:

Tested this manually with a system-installed build of liboqs 0.8.0-rc1. Not sure how best to test this in CI yet.

tranzystorekk commented 1 year ago

Oops, meant for this to be a draft for now.

tranzystorekk commented 1 year ago

Ping @wucke13 for discussion

tranzystorekk commented 1 year ago

Added requested changes, split the code into some more includedir related functions to allow early return if vendored is enabled.

tranzystorekk commented 1 year ago

Added the suggested change and README docs. I was split between processing the patch version as an interger or as a str, but the latter seems more reliable, especially against versions like 0.8.001

thomwiggers commented 1 year ago

Shoot, I hadn't thought about this but 001 being not allowed also means that #192 is again unsolved.

thomwiggers commented 1 year ago

And that is a problem for releasing updates :(

tranzystorekk commented 1 year ago

I guess I also forgot something - an env var like LIBOQS_NO_VENDOR that would make it easier for distributions to ensure we're only built if system package is available.

Such a thing makes it easier for distros to manage a central liboqs package with e.g. sexurity vulnerabilities patched, as with SSL libraries.

thomwiggers commented 1 year ago

Sounds like a good addition