Rust Compile Time Optimizations
-
LLD linker: The Rust compiler spends a lot of time in the "link" step. LLD is much faster at linking than the default Rust linker. To install LLD, find your OS below and run the given command [1]:
-
Ubuntu:
sudo apt-get install lld
-
Arch:
sudo pacman -S lld
-
Windows: Ensure you have the latest cargo-binutils
cargo install -f cargo-binutils rustup component add llvm-tools-preview
-
MacOS: You can follow this instructions to install lld manually or install llvm through brew which includes lld:
brew install llvm
-