As we clearly state this on the README of libR-sys, the toolchain should be stable-msvc.
When building for Windows, the default host should be stable-msvc and special rust targets should be added for compatibility with R:
So, I feel it's a good idea to specify it explicitly on cargo build as well. When there's no toolchain installed, the user gets this error and knows what's wrong. I don't know what happens when extendr is built with the gnu toolchain, but I think this should be a bit more helpful.
error: toolchain 'stable-x86_64-windows-pc-msvc' is not installed
One caveat is that the user cannot use another channel of the toolchain (e.g. nightly-msvc). But this can be manually set by changing TOOLCHAIN variable in Makevars.win, so I believe this won't be a problem
As we clearly state this on the README of libR-sys, the toolchain should be
stable-msvc
.So, I feel it's a good idea to specify it explicitly on
cargo build
as well. When there's no toolchain installed, the user gets this error and knows what's wrong. I don't know what happens when extendr is built with the gnu toolchain, but I think this should be a bit more helpful.One caveat is that the user cannot use another channel of the toolchain (e.g.
nightly-msvc
). But this can be manually set by changingTOOLCHAIN
variable inMakevars.win
, so I believe this won't be a problem