This trivial modification of the Makevars.ucrt template allows propagating TOOLCHAIN environment variable to the package build step. While on platforms other than Windows default Rust toolchain controls how the package is built, the toolchain was hardcoded for Windows in the makevars files.
This trivial modification of the
Makevars.ucrt
template allows propagatingTOOLCHAIN
environment variable to the package build step. While on platforms other than Windows default Rust toolchain controls how the package is built, the toolchain was hardcoded for Windows in the makevars files.One of the usecases is an easy switch to
nightly
version of the toolchain, see e.g. https://github.com/extendr/helloextendr/pull/15.