How to using nightly crate in stable workspace

⚓ Rust    📅 2025-11-12    👤 surdeus    👁️ 4      

surdeus

Hi There!

I have a project with three crates combined into a single workspace. For one of the crates, I need to use a random number generator, which is only included in the nightly version of the standard library. However, I don't want to change the version for the entire system. Is it possible to do this for just one crate?

I know about rust-toolchain(.toml), but when I created it in a local crate, cargo check at the workspace level still returned an error about features not being available for the stable compiler.

3 posts - 2 participants

Read full topic

🏷️ Rust_feed