Nix Rust | 690 Members | |
| Rust | 154 Servers |
| Sender | Message | Time |
|---|---|---|
| 3 Dec 2025 | ||
| For an example of the caching, you can see what I did with Wild. Basically the assumption is "the Cargo.lock and flake.lock files do not change very often (compared to the rest of the souce)" So there's a dedicated job that refreshes the cache when the lockfiles change | 22:37:03 | |
You can use nightly and beta with buildRustPackage just as easily as the other options, so I wouldn't really say that's an advantage. It's even shown in the reference how to | 22:38:21 | |
| You just can't in Nixpkgs | 22:38:34 | |
rosssmyth: How do you handle day-to-day development? Do you enter a nix shell or do you always nix run/build? If it's purely the former, I'm guessing the main benefit of the caching is for CI? | 22:39:26 | |
* rosssmyth: How do you handle day-to-day development? Do you enter a nix shell (and then use Cargo manually) or do you always nix run/build? If it's purely the former, I'm guessing the main benefit of the caching is for CI? | 22:39:45 | |
The packages that allow it are rust-overlay and the other one I can't rememberhttps://nixos.org/manual/nixpkgs/unstable/#using-rust-nightly-in-a-derivation-with-buildrustpackage | 22:40:03 | |
| Generally both. The caching in CI is pretty much always a win, then caching when I'm just doing day-to-day dev is also great cause I always like to verify that things build alright in the sandbox when I'm developing | 22:41:26 | |
In reply to @rosssmyth:matrix.orghttps://github.com/nix-community/fenix ? | 22:42:22 | |
| yeah | 22:42:30 | |
| I see, makes sense. Thanks for the explanation! | 22:43:29 | |
| 4 Dec 2025 | ||
| 01:45:35 | ||
| 04:20:40 | ||
| 08:59:20 | ||
| 16:42:04 | ||
| 18:09:36 | ||
| 5 Dec 2025 | ||
| 17:17:01 | ||
| 7 Dec 2025 | ||
| 13:39:01 | ||
| 8 Dec 2025 | ||
some part of the toolchain seems to have started stripping the RUNPATH from proc macro crates that link shared libraries in the environment. Anyone have a fix? | 05:16:32 | |
it's set to /path/to/my/project/outputs/out/lib, which is pretty weird because that doesn't even exist... | 05:17:46 | |
| dpc (migrated to @dpc:dpc.pw): looks like you reported something similar at https://discourse.nixos.org/t/rust-binaries-losing-runpath-on-one-machine-only-fedora/34324, did you ever sort it out? | 05:19:23 | |
| Could you provide code? | 16:09:23 | |
| It's hard to know what going on with just a description | 16:09:36 | |
| 21:31:24 | ||
| 9 Dec 2025 | ||
in my environment it reproduces easily with cargo test in https://github.com/Ralith/vk-shader-macros/. Build should have a rust toolchain and SHADERC_LIB_DIR = "${pkgs.shaderc.lib}/lib"; in the environment. | 00:23:17 | |
| you'll get the same error (plus some downstream noise), and you can see:
modulo variation in the filename, ofc | 00:27:19 | |
| I meant the Nix code. | 03:17:25 | |
| I would like to use your exact setup | 03:17:34 | |
| So just saying "run cargo test" isn't that useful | 03:17:50 | |
| What does the environment look like, where did you get cargo, does this replicate in the sandbox | 03:18:12 | |
the nix code is utterly trivial, it's a shell with rustChannels.stable.rust and the env var I mentioned | 04:04:38 | |