From 6399cef59aca5cd8079e2fda6e5e28617bce905f Mon Sep 17 00:00:00 2001 From: pacak Date: Thu, 16 Apr 2026 09:05:41 -0400 Subject: [PATCH 1/3] Replace `cargo-asm` with `cargo-show-asm` Use a working alternative. Chances are `cargo-asm` is not going to work with more up to date rust compiler. Invocation for the script is the same, so it should just work. `--no-color` is not needed for redirects. --- benchmarks/runtime/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/runtime/README.md b/benchmarks/runtime/README.md index 2bb3e4ee..a479022f 100644 --- a/benchmarks/runtime/README.md +++ b/benchmarks/runtime/README.md @@ -7,7 +7,7 @@ This is a collection of runtime benchmarks for the code generated by `bon` crate If you'd like to run the benchmarks yourself, first you need to install the following: - `Valgrind`. Its `cachegrind` component is used by [`gungraun`](https://github.com/gungraun/gungraun) benchmark to display the instruction counts and cache/RAM hits. -- `cargo-asm`. It's used to get the resulting assembly code for the benchmarked functions. +- `cargo-show-asm`. It's used to get the resulting assembly code for the benchmarked functions. If you are on Ubuntu or Debian, just run the following commands to install the dependencies: From 8bd887c6903c858fdf4783fe3ca189013b486f43 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Thu, 16 Apr 2026 13:23:58 +0000 Subject: [PATCH 2/3] Update the benchmark script to use `cargo-show-asm` --- benchmarks/runtime/README.md | 4 ++-- benchmarks/runtime/run.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/runtime/README.md b/benchmarks/runtime/README.md index a479022f..2d213c69 100644 --- a/benchmarks/runtime/README.md +++ b/benchmarks/runtime/README.md @@ -7,12 +7,12 @@ This is a collection of runtime benchmarks for the code generated by `bon` crate If you'd like to run the benchmarks yourself, first you need to install the following: - `Valgrind`. Its `cachegrind` component is used by [`gungraun`](https://github.com/gungraun/gungraun) benchmark to display the instruction counts and cache/RAM hits. -- `cargo-show-asm`. It's used to get the resulting assembly code for the benchmarked functions. +- [`cargo-show-asm`](https://github.com/pacak/cargo-show-asm). It's used to get the resulting assembly code for the benchmarked functions. If you are on Ubuntu or Debian, just run the following commands to install the dependencies: ```bash -cargo install cargo-asm gungraun-runner@$(cargo pkgid gungraun | cut -d@ -f2) +cargo install cargo-show-asm gungraun-runner@$(cargo pkgid gungraun | cut -d@ -f2) sudo apt install valgrind ``` diff --git a/benchmarks/runtime/run.sh b/benchmarks/runtime/run.sh index aeb5d704..e8f2ab05 100755 --- a/benchmarks/runtime/run.sh +++ b/benchmarks/runtime/run.sh @@ -12,8 +12,8 @@ for bench in $benches; do # If vscode is present, show diff: if command -v code; then - cargo asm --features "$bench" --no-color "runtime_benchmarks::$bench::builder_bench" > builder.dbg.s || true - cargo asm --features "$bench" --no-color "runtime_benchmarks::$bench::regular_bench" > regular.dbg.s || true + cargo asm --features "$bench" -p runtime-benchmarks --lib --no-color "runtime_benchmarks::$bench::builder_bench" > builder.dbg.s || true + cargo asm --features "$bench" -p runtime-benchmarks --lib --no-color "runtime_benchmarks::$bench::regular_bench" > regular.dbg.s || true code --diff regular.dbg.s builder.dbg.s fi From 43fa44a7857e43441a36f7cf0d4d16e56207f029 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Thu, 16 Apr 2026 13:24:58 +0000 Subject: [PATCH 3/3] Remove redundant --no-color --- benchmarks/runtime/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/runtime/run.sh b/benchmarks/runtime/run.sh index e8f2ab05..30ca01a6 100755 --- a/benchmarks/runtime/run.sh +++ b/benchmarks/runtime/run.sh @@ -12,8 +12,8 @@ for bench in $benches; do # If vscode is present, show diff: if command -v code; then - cargo asm --features "$bench" -p runtime-benchmarks --lib --no-color "runtime_benchmarks::$bench::builder_bench" > builder.dbg.s || true - cargo asm --features "$bench" -p runtime-benchmarks --lib --no-color "runtime_benchmarks::$bench::regular_bench" > regular.dbg.s || true + cargo asm --features "$bench" -p runtime-benchmarks --lib "runtime_benchmarks::$bench::builder_bench" > builder.dbg.s || true + cargo asm --features "$bench" -p runtime-benchmarks --lib "runtime_benchmarks::$bench::regular_bench" > regular.dbg.s || true code --diff regular.dbg.s builder.dbg.s fi