prql
prql copied to clipboard
`cargo-run-bin`
What's up?
https://github.com/dustinblackman/cargo-run-bin, from @dustinblackman
...looks cool — solves the problem of having to install lots of crates in task setup-dev.
Instead, install this one, set some aliases, and it'll install the correct version of the binary whenever it's called if necessary.
I like this. We do have the required tools listed in flake.nix, but this would more user-friendly.
The instructions for getting started would be:
install rustupinstall gotaskcargo install cargo-run-bintask test-rust-fast
Although, the flake.nix approach does have the benefit of having these binaries cached between projects (if they use the same version), so I wouldn't want to abandon that. The aliases you propose would break that.
Could the aliases be set conditionally?
Interesting point on flake.nix, would indeed be good to keep that working (I'm less keen on routing everything through it, because it's a more involved integration, but great for those who want it).
There's https://github.com/dustinblackman/cargo-run-bin/issues/7, but I think that just means that cargo bin works on nix, rather than it routes cargo insta through nix; is that right?
That issue is pointing to a PR that adds cargo-run-bin into nixpkgs, the main nix repository of software.
There is no "works on nix", as nix is just a package manager that pull packages from repos.
Our flake file is essentially just a list of stuff that we want installed, there is nothing more-involved. The main barrier is that one need nix installed, which is enough of a barrier to need other ways of listing dependencies.
Totally, totally.
I think the only outstanding question was whether using cargo bin would skip nix for the inner binaries such as cargo-insta. I think the answer is "yes it would skip nix", is that your understanding?
Yes, that is very probable.