4 ms·
That sounds interesting. I have 0 experience with nix, could you explain what's the difference with doing `cargo new <name>`? What extra benefits do you get? T
by woile 4y ago
That sounds interesting. I have 0 experience with nix, could you explain what's the difference with doing `cargo new <name>`? What extra benefits do you get?
Thanks!
- the_gipsy 4y agoThat gets you some Cargo.toml/lock files, from which you can build on another system. But there are some system dependencies, like dynamic libraries, which are not described nor pinned. Nix forces you to describe 100% of the build/run inputs.
- rgoulter 4y agoAh, in terms of just instantiating a template, the nix flake templates are going to be oriented around using nix. A flake.nix file is roughly comparable to a Dockerfile. With a Dockerfile, you're describing how to build an image that can be deployed in Docker runtimes. With nix, you're describing how nix can build the package. A neat side-effect of this is that if you've got a nix file which can build the package, nix will be able to provide the toolchain used to build the package. (Whereas rustup more specifically provides the rust toolchain).