Skip to content

davidlattimore/warm-build-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Rust warm-build benchmark

This repository is just intended as a benchmark for warm build times of Rust code with a substantial number of large dependencies.

To run the benchmark, run:

./run-benchmark

The accompanying blog post is Speeding up Rust edit-build-run cycle.

Pre-requisites

In order to run this benchmark suite you will need these installed:

  • hyperfine - install on linux with sudo apt install hyperfine or on mac with brew install hyperfine
  • x86_64-unknown-linux-musl target - install with rustup target add x86_64-unknown-linux-musl

Benchmarking mold linker (default)

To be able to benchmark the build times using the mold linker, you will need:

  • mold installed - install on linux with sudo apt install mold

Benchmarking wild linker

To be able to benchmark the build times using the wild linker, you will need to:

  • Build and run wild (see Wild's README.md)
  • Have it in your PATH
  • Modify the .cargo/config.toml file to use wild as the linker instead of mold, an example .cargo/config.toml file's contents would be:
[build]
target = "x86_64-unknown-linux-musl"

[target.x86_64-unknown-linux-musl]
linker = "/usr/bin/clang"
#rustflags = [ "-C", "relocation-model=static", "-C", "link-arg=--ld-path=mold" ]
rustflags = [ "-C", "relocation-model=static", "-C", "link-arg=--ld-path=wild" ]

[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang"
#rustflags = ["-C", "link-arg=--ld-path=mold"]
rustflags = ["-C", "link-arg=--ld-path=wild"]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •