Long compile times
Hey, The compile time is very long, is there a way to fix this?, The README says that it already uses a pre build bindgen.rs, but this literally feels like building from source
Hi, and thanks for the report!
Even with the pre-generated bindgen, it is building the C library from source. You can look into the pkg-config feature to detect and link a separately-installed lib (for example the system lib).
The default behaviour is to build the C library using the cc crate, which applies the same "profile" (dev/release) as the rust side. So dev builds should result in faster C compilation time as well, and release builds in a slower one.
Hi, and thanks for the report!
Even with the pre-generated bindgen, it is building the C library from source. You can look into the pkg-config feature to detect and link a separately-installed lib (for example the system lib).
The default behaviour is to build the C library using the
cccrate, which applies the same "profile" (dev/release) as the rust side. So dev builds should result in faster C compilation time as well, and release builds in a slower one.
So, What options do we have ?
Using the pkg-config feature can help reduce build time by not compiling the C library. Depending on what your system library offers, it might end up dynamically linking (for example, on archlinux, the zstd system lib is built without static linking support, so using pkg-config will dynamically link to libzstd.so). If that's not what you want, you may need to look into configuring pkg-config with your own build of libzstd.