There's a closed pull request on the void-packages repository ripgrep: use system-provided libpcre2 https://github.com/void-linux/void-packages/pull/25179 Description: By default, for musl targets `libpcre2` is linked statically. This patch fixes this and reduces binary size by ~400 KiB for `x86_64-musl` target. More info here: https://github.com/burntsushi/rust-pcre2/tree/HEAD/pcre2-sys#notes