Skip to content

Alfablos/nix-rust-build-examples

Repository files navigation

Build Rust in Nix

Examples of building rust projects using Nix

Tools

  • rustPlatform.buildRustPackage: ./buildrustpackage-example

  • crate2nix: ./crate2nix-example

Notes

  • 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 around lld.
    objdump -j .comment -s /path/to/target/debug/buildrustpackage-example will show Linker: LLD

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published