Examples of building rust projects using Nix
-
I’m including the Tokio dependency as a git repo. It is absolutely unneeded but it forces to show how to deal with outputHashes for
buildRustPackage
. -
I explicitly set lld as a linker since I’m not sure if it’s the default for the stable channel. It is provided by
pkgs.llvmPackages.ld
, which is a wrapper aroundlld
.
objdump -j .comment -s /path/to/target/debug/buildrustpackage-example
will showLinker: LLD