Cargo-pgo: Subcommand for optimizing Rust binaries/libraries with PGO and BOLT
github.com·1d·
Discuss: Hacker News
Flag this post

Cargo subcommand that makes it easier to use PGO and BOLT to optimize Rust binaries.

For an example on how to use cargo-pgo to optimize a binary on GitHub Actions CI, see this workflow.

Installation

$ cargo install cargo-pgo

You will also need the llvm-profdata binary for PGO and llvm-bolt and merge-fdata binaries for BOLT.

You can install the PGO helper binary by adding the llvm-tools-preview component to your toolchain with rustup:

$ rustup component add llvm-tools-preview

For BOLT, it is highly recommended to use Docker. See [below](#bolt-installati…

Similar Posts

Loading similar posts...