conferences | speakers | series

Write the Nix package of a Rust project in 2022: an opinionated comparison

home

Write the Nix package of a Rust project in 2022: an opinionated comparison
NixCon 2022

In this talk, we will address the different existing strategies to package an arbitrary Rust crate. Our goals are to try to minimize the amount of Nix code required to quick start, discussing how to deal with overlays, and finally demonstrating why Nix offers a greater cross-compilation developer experience than Cargo.

Existing solutions that will be compared are [`nixpkgs`](https://nixos.org/manual/nixpkgs/stable/#compiling-rust-applications-with-cargo), [`naersk`](https://github.com/nix-community/naersk), [`crate2nix`](https://github.com/kolloch/crate2nix), [`cargo2nix`](https://github.com/cargo2nix/cargo2nix) and [`crane`](https://github.com/ipetkov/crane) (used by [`dream2nix`](https://github.com/nix-community/dream2nix)). We will analyze what are the derivations produced for each of those and inspect how IFDs are used.

Speakers: Yvan Sraka