NixCon 2022

Write the Nix package of a Rust project in 2022: an opinionated comparison
2022-10-21 , Main track (Gym)

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, naersk, crate2nix, cargo2nix and crane (used by dream2nix).

We will analyze what are the derivations produced for each of those and inspect how IFDs are used.


Do you allow your talk to be recorded?: yes What level of experience in Nix is the talk addressed to?:

Mid-level

See also: Slides (32.4 KB)

Yvan Sraka has a master's degree in math and computer sciences applied to biology from the Sorbonne University in Paris. Having discovered C++ programming as a child, he is involved in open-source communities. His previous commercial experience includes working in 3D Graphics and Runtime design with Rust, Nix, and Haskell. He used to teach Systems programming, Architecture, and DevOps to master's students and design algorithm competitions and kids/teens coding workshops (where he helps them build small video games). He lives in Belgium, loves biking, hiking, climbing, and vegan cooking.