-
Is it possible to globally overlay rustc, rustfmt, cargo, etc. for the dev shell and the build environment? I tried to use https://github.com/yusdacra/nix-cargo-integration/blob/master/docs/example_flake.nix#L39 but I wasn't very successful. In particular, I am interested in using a version of rustc which has the |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
If you are trying to add a target, you should use a rust-toolchain.toml file. In your case, this can look like this: [toolchain]
channel = "nightly-2022-03-05" # or whatever channel you are using
targets = ["wasm32-unknown-unknown", "x86_64-unknown-linux-gnu"] There isn't yet a way to directly override what toolchain |
Beta Was this translation helpful? Give feedback.
-
I tried using a toolchain file but it didn't seem to have any effect. Maybe some interaction with cargo workspaces? I put the toolchain file in the root workspace directory next to Cargo.lock |
Beta Was this translation helpful? Give feedback.
-
That's interesting. Is it possible for you to share your project? I'd like to take a look at it. |
Beta Was this translation helpful? Give feedback.
-
@NickHu did you stage the |
Beta Was this translation helpful? Give feedback.
-
Same, whats the best way of doing this ATM? |
Beta Was this translation helpful? Give feedback.
-
right now |
Beta Was this translation helpful? Give feedback.
right now
nci.toolchains.mkBuild
andnci.toolchains.mkShell
attributes can be used to set toolchain also other than the automatic rust-overlay toolchain that pulls from the file (also can set `nci.toolchainConfig if you don't or can't use the file for whatever reason)