| 29 Nov 2021 |
| anderscs joined the room. | 16:29:38 |
| 1 Dec 2021 |
| slby joined the room. | 08:14:53 |
brendanzab | Hey, curious if folks have any preference between cargo2nix and crate2nix? Managed to get cargo2nix working. The API seems a bit nice than crate2nix, but I'm not sure how to feel about committing a cached Cargo.nix file, and the finiky process of trying to initially generate an initial Cargo.nix, when your flake depends on it being present… | 23:43:33 |
brendanzab | I'm still very new to nix so it could be I'm mistaken and confused with stuff though 😅 | 23:44:56 |
brendanzab | Or do folks just jump into a nix-shell or nix develop and just call cargo directly? | 23:47:09 |
Yuka (she/her) | depends a lot on what you want to do | 23:50:58 |
Yuka (she/her) | For development I do nix-shell | 23:51:06 |
Yuka (she/her) | For deployments I use the rustPlatform from nixpkgs | 23:51:22 |
Yuka (she/her) | you shouldn't really rely on binaries you've built in nix-shell for a longer time because the libraries they link to might be garbage-collected | 23:52:06 |
Yuka (she/her) | but doing buildRustPackage for each development run takes too much time because it is non-incremental | 23:52:35 |
| 2 Dec 2021 |
Ralith | yeah, I do all my dev in a shell | 00:00:46 |
brendanzab | ahh gotcha | 00:02:10 |
brendanzab | thanks for the insights! can be a bit bewhildering hehe | 00:02:43 |
brendanzab | knowing what to choose 😅 | 00:02:58 |
brendanzab | This was what I ended up with: https://gist.github.com/brendanzab/eecc9d0b0e9c4042db1b736264e8c11c | 00:06:22 |
brendanzab | although I think I might remove the packaging stuff and just keep the shell stuff, based on what folks have said | 00:06:53 |
brendanzab | now gotta figure out how to get VS Code to work with it 😰 | 00:07:20 |
brendanzab | how do you work with different toolchains? as a library developer I often want to test against nightly, beta, stable, pinned toolchains. Do you just use the stable toolchain in your development flake, and then test different stuff on CI? Or are there better ways to switch between | 00:13:30 |
brendanzab | Re. developing in a shell, do you do it on a per-package basis, or do you install cargo/rust globally? I know the latter probably isn't recommended, but seems like it could be easier for the random Rust project? | 00:24:41 |
Ralith | I have a shell per project; they tend to vary | 02:01:30 |
Ralith | you can have a common shell that you reuse though | 02:01:46 |
brendanzab | how do you cope if a project is not using nix? | 02:05:01 |
brendanzab | do you make a personal project-specific nix thing? | 02:05:23 |
brendanzab | * do you make a personal project-specific nix thing that you hide in your local ignores? | 02:05:36 |
brendanzab | at any rate, this is what I ended up with: https://gist.github.com/brendanzab/8b9f1abfc28fca8fbdef745995be3a76 | 02:06:22 |
brendanzab | dunno if it can be simplified more | 02:06:50 |
brendanzab | I've got an .envrc that loads it, and seems to work nicely with vs code | 02:07:23 |
brendanzab | * I've got an .envrc that loads it, and seems to work nicely with vs code and rust-analyzer with no dramas | 02:07:36 |
Ralith | yeah I drop local shell.nixes in stuff all the time | 05:39:42 |
| Patsakula Nikita joined the room. | 14:20:19 |