Lately I’ve been using rustup (installed outside of nix-shell).
This is due to a couple of reasons: Ubuntu 21.10 "Can not attach stdlib sources automatically" · Issue #8364 · intellij-rust/intellij-rust · GitHub (intellij-rust requires the rust sources to be rw) and also cargo likes to default its binaries to $USER/.cargo/bin which breaks some stuff.
Anyway, using rustup seemed to work fine on my main system, however, seems I get issues on another one:
error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /root/git/controller/target/debug/deps/libasync_trait-094d5e5e5dd0fd0e.so)
Not exactly sure what’s going on but it seems that for some reason the compiler from rustup ends up using the system’s libc rather than the one from the nix-shell and they are not the same version (2.32 vs 2.34).
Is there any nice way around this?