How do I compile a Rust binary on NixOS that works on other Linux distros?

Use patchelf to set any interpreter you want. On most other linuxes /usr/lib64/ld-linux-x86-64.so.2 should do.

4 Likes