It's missing dependency on gcc-libs.
I do not see this mentioned within the package guidelines, but I did find it as a dependency of ripgrep (one of the example packages).
This comes from running namcap [0] on the output package. You can get similar info from ldd, but namcap saves a bit of time in this regard.
* It needs options=(!lto) since it won't build with LTO on and the default linker. (I guess you can also force a different linker that works.)
Again not mentioned in the rust package guidelines, but I believe rust does LTO itself, and thus you do not want makepkg from interfering, correct?
Nothing to do with how rust does LTO, in fact I haven't looked at all into how rust does it. For your package specifically, it must be turned off due to this issue [1] reported by @orhun, one of the Arch Package Maintainers. Try turning on LTO, you'll see the compilation fail. I use devtools [2] to build packages, which ensures clean chroots and also catches issues like this (it has some different defaults compared to just makepkg, including LTO on). [0]: https://wiki.archlinux.org/title/Namcap [1]: https://github.com/briansmith/ring/issues/1444 [2]: https://archlinux.org/packages/extra/any/devtools/