Configuring the Rust toolchain

This topic describes the process to configure the Rust toolchain. For this, you need to have access to the Rust toolchain and set the appropriate RUSTFLAGS.

Procedure

  1. Ensure that you have a Rust toolchain, either by appending your path:
    $ export PATH=/path/to/toolchain:$PATH
    Or linking via rustup (currently not shipped)
    $ rustup toolchain link my-toolchain /path/to/...
    $ rustup default my-toolchain
  2. Run rustc and cargo, to ensure they work as intended.
  3. Configure the RUSTFLAGS environment variable.
  4. To build cryptography, set the -blazy flag. To build bcrypt, disable LTO (currently not supported):
    $ export RUSTFLAGS="-Clink-args=-blazy 
                        –Clto=no
                        -Cembed-bitcode=no 
                        –Clinker-plugin-lto=no"