Nix Rust | 635 Members | |
| Rust | 147 Servers |
| Sender | Message | Time |
|---|---|---|
| 26 Oct 2025 | ||
| (I don't know if this is a related problem, but my rustup unstable toolchain fails to link because it tries to invoke a GCd ld-wrapper from the store.) | 15:34:38 | |
No idea, not familiar with udeps
I would recommend against it and instead recommend either fenix or rust-overlay
This all sounds fine
Yeah you'll hit issues compiling/running stuff that gets installed there. Instead of doing shellHook crimes you should simply never have anything in this directory in the first place. For example, never use
Yeah, the
It probably doesn't require nightly to build, just to run, but that's a guess. Also I think there are some things in nixpkgs that do actually need nightly to build, so that's not too crazy
Likely because it uses the toolchain from your ambient environment (which in this case is a stable toolchain) rather than e.g. being wrapped to force a particular toolchain (which would be awful UX-wise, so that's why it's not done that way) | 17:20:25 | |
| 27 Oct 2025 | ||
| 11:27:24 | ||
| 11:27:29 | ||
| 11:29:46 | ||
| I am using right now rust from nixpkgs. I want to use nightly for unit tests, rustup provides the possibility to switch to nightly for a single command invocation. Is there a way to do this with fennix or another overlay? | 11:32:30 | |
| * I am using right now rust from nixpkgs for development. I want to use nightly for unit tests, rustup provides the possibility to switch to nightly for a single command invocation. Is there a way to do this with fennix or another overlay? | 11:32:55 | |
|
| 13:17:59 | |
| Bisected to https://github.com/NixOS/nixpkgs/pull/455250 | 13:29:19 | |
| i reccomens using crane combined with fenix, i found it great myself. perhaps fenix alone is enough for you though. | 13:52:15 | |
In reply to @quadradical:federated.nexusHow would you switch between toolchains? | 15:22:02 | |
| multiple devshells | 15:26:56 | |
| yes, would work | 18:50:07 | |
| for that fenix only is enough | 18:50:15 | |
but you can also for your unit tests, use crane with fenix, and then just use nix flake check to run your tests | 18:50:29 | |
| 20:55:00 | ||
| 28 Oct 2025 | ||
| 14:35:52 | ||
| a follow up question to yesterdays question. i use currently stable rust. because i want that every code i write to work on stable. i am only interested in unstable for things like miri and instrumentation (for test code coverage). ... when i choose nightly in my devenv i think there is only a very small chance that my code is treated differently compared to stable right? | 22:03:46 | |
| yeah, pretty much. differences in behavior are almost always either a bug (in rust) or a fix (which you'll get in a few weeks on stable, and you probably want) | 22:31:19 | |
| * yeah, pretty much. differences in behavior are almost always either a bug (in rust itself) or a fix (which you'll get in a few weeks on stable, and you probably want) | 22:31:39 | |
| * yeah, pretty much. differences in behavior are almost always either a bug (in rust itself) or a fix (which you'll get in a few weeks on stable, and you probably want) (obviously this no longer holds true when you opt into unstable features with #![feature(...)] or -Z and such, but this is true for already-stable things) | 22:34:04 | |
| thank you for clarifying | 22:39:09 | |
| 29 Oct 2025 | ||
| I switched to fenix with complete toolchain. The problem is that rustfmt (or whatever is the default for formatting) somehow doesn't recognize that the project is written in edition 2024. It fails with an error something along the line "let chains only supported in edition 2024". | 11:38:45 | |
| The editor i use is helix | 11:39:13 | |
what's your rustfmt.toml say | 14:41:13 | |
| I don't have one in the project. Are there other places where i should look? | 17:10:20 | |
Make sure which rustfmt doesn’t pick up an older rustup installation? | 17:21:22 | |
| that might be your problem. i'm not sure if rustup cares to read Cargo.toml to figure out the edition | 18:49:07 | |
| you do at least have the edition set properly in Cargo.toml, yeah? | 18:49:56 | |
| * that might be your problem. i'm not sure if rustfmt cares to read Cargo.toml to figure out the edition | 18:50:52 | |