open-quantum-safe / liboqs-rust

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

Don't recompile oqs everytime cargo build is invoked #216

Open wucke13 opened 1 year ago

wucke13 commented 1 year ago

Currently, the build.rs of oqs-sys is configured so that oqs is recompiled every time cargo build is executed. This really takes the fun away from cargo watch etc., as it blows the time of a cargo build with an already filled target/ to 20 seconds+.

https://doc.rust-lang.org/cargo/reference/build-scripts.html#change-detection provides some guidance on how to refine the behavior in this regard.

thomwiggers commented 1 year ago

This should already be caught by: https://github.com/open-quantum-safe/liboqs-rust/blob/main/oqs-sys/build.rs#L126-L129....

thomwiggers commented 1 year ago

though at least CC should be added to the environment variables, maybe also CMAKE_*