Installation
To use this project, you need to have an installation of Rust version 1.85 or newer. As we use flint-sys
which itself depends on gmp, usage of qFALL is currently restricted to Mac, Linux and Windows Subsystem for Linux. To compile FLINT and gmp, it is required to have m4, make, and a C-compiler like gcc installed.
Command for installing m4, make, and gcc:
sudo apt-get install m4 gcc make
Integration
You can integrate our libraries via crates.io by running:
cargo add qfall-math qfall-tools qfall-schemes
Alternatively, you can get the latest version from GitHub.
To get the latest version from GitHub, you can
include a link to the dev branch in your Cargo.toml.
qfall-math = { git = "https://github.com/qfall/math", branch="dev" }
qfall-tools = { git = "https://github.com/qfall/tools", branch="dev" }
qfall-schemes = { git = "https://github.com/qfall/schemes", branch="dev" }
Be aware that the external libraries in our projects must be compiled once during the first build, which may take about 10-30 minutes (depending on the used hardware and operating system). After the first installation, you should be able to use qFALL.
Troubleshooting
If you encounter compilation errors such as
unsupported compileron a rolling Linux distribution like Arch, the following dependency might need to be fixed in the following way.
- Clone the dependency
gmp-mpfr-syswithgit clone git@github.com:stegos/gmp-mpfr-sys.git.- Download the patch fix.patch, copy to the repo folder and run
git apply fix.patch.- Edit the
Cargo.tomlfile of your local copies ofqFALL-mathandqFALL-toolsand add the following lines.[patch.crates-io] gmp-mpfr-sys = { path = "../gmp-mpfr-sys/" }The
pathvalue should correspond to the relative or absolute path of your localgmp-mpfr-sysrepository and all repositories depending onqFALL-mathandqFALL-tools, should depend on your local copy of them.Thanks to Lorenzo Tucci for identifying this workaround. This inconvenience affecting a few Linux distributions should become obsolete once we transition to FLINT 3.
Documentation
The official documentation is hosted on docs.rs.
Alternatively, you can build it locally. Once you have integrated the desired library, running the command below will generate documentation for your entire project, including all integrated qFALL crates.
cargo doc --open
If you’re using WSL and your browser does not open, retry after installing wslu.
What can you expect from our documentation? Every public interface is provided with (1) an explanation of the behavior; (2) a description of all parameters; (3) a description of the output; (4) an example of the function; and (5) a list of potential errors and failures that can occur.