ZenGo-X / class

Rust library for building IQC: cryptography based on class groups of imaginary quadratic orders
GNU General Public License v3.0
63 stars 31 forks source link

Improve build process #2

Open omershlo opened 5 years ago

omershlo commented 5 years ago

Currently the build.rs file will re-install pari library each time we cargo build. This is taking very long time and unnecessary if pari is already installed. Find a way to change build.rs to check if pari is already installed and if it does - skip installation.

knarz commented 5 years ago

The build process could use some overhauling in general. For Windows/macOS the library should just be statically linked and not leave any artifacts on the system.

omershlo commented 5 years ago

I agree. can you help ?

amanusk commented 5 years ago

Suggestion: PARI is a well maintained library, and has extensive installation documentation ftp://pari.math.u-bordeaux.fr/pub/pari/manuals/2.7.6/INSTALL.pdf as well as packages in at least some Linux distributions: https://packages.ubuntu.com/bionic/libpari-dev

Why not add interactions for installation, then remove the entire make process from build.rs?

I was able to compile and pass all tests without rebuilding the local library (which of course takes a lot less time)

Alternatively, add it as a git submodule, with installation instructions

omershlo commented 5 years ago

I saw this method in other libraries. One motivation is that in my method you don't need to update version and make adjustments for each new Pari versions. Another possible advantage is that we can make changes to Pari