Search code examples
rustnightly-build

How to enable nightly features on stable builds?


I need to use a deprecated project which does no longer runs using newer versions of stable versions of rustc, but which requires nightly features for being able to use avx512 in order to be able to complete in an acceptable time frame.

The past stable builds of the rust compiler are found in GitHub but where to find past nightly toolchain builds ?


Solution

  • You can download old nightlies. For example rustup toolchain install nightly-2018-10-26, downloads the nightly for 1.30.0 (I'm not sure, just typed the date on the announcement post + 1 day because the exact date didn't have a toolchain available for me).

    There's also an option to use features on stable builds. Do not use that, it is intended for development of rustc itself, but if you set the environment variable RUSTC_BOOTSTRAP=1 rustc will allow unstable features on stable builds.