Skip to content

Commit 6f787f5

Browse files
committed
mention that rust can also be installed with rtools43
1 parent b3b089f commit 6f787f5

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,26 @@ If you *vendor* the full rust code in your R package, you must name authors of a
6363

6464
As of writing (October 2023), the `aarch64-pc-windows-gnullvm` target has [tier-3 status](https://doc.rust-lang.org/rustc/platform-support/pc-windows-gnullvm.html) and is not yet supported in the standard rustup distribution. If you install the standard rustup toolchain on Windows it will produce x86_64 binaries, even on ARM64, so that won't work.
6565

66-
However msys2 has been shipping arm64 rust toolchains for a while, and they work great. Hence, one way to test your Rust packages on arm64-windows is to install msys2 and then use it to install rust:
66+
However msys2 has been shipping arm64 rust toolchains for a while, and they work great. Hence, one way to test your Rust packages on arm64-windows is to install rust using pacman in rtools43 or msys2:
6767

68-
```
68+
```sh
6969
pacman -Sy mingw-w64-clang-aarch64-rust
7070
```
7171

72-
This will install cargo/rust into `C:\msys64\clangarm64\bin`. To use this toolchain in R, you should put this directory on the PATH in R, for example using your `~/.Renviron` file:
72+
This will install cargo/rust into `C:\msys64\clangarm64\bin` or in `C:\rtools43-aarch64\clangarm64\bin` if you used msys2 from rtools43. To use this toolchain in R, we need to put this directory on the PATH, for example using your `~/.Renviron` file:
7373

74-
```
75-
PATH="c:\msys64\clangarm64\bin;${PATH}"
74+
```sh
75+
## Upstream msys2:
76+
## PATH="c:\msys64\clangarm64\bin;${PATH}"
77+
78+
## Rtools43 msys2:
79+
PATH="${RTOOLS43_AARCH64_HOME}\\clangarm64\\bin;${PATH}"
7680
```
7781

7882
If you previously have installed rust via rustup, you might have to remove this first (`rustup self uninstall`), because many packages automatically put `$(USERPROFILE)\.cargo\bin` on the PATH, and as said, this toolchain does not support aarch64 targets.
83+
84+
You can test it by installing the hellorust R package:
85+
86+
```r
87+
install.packages("hellorust")
88+
```

0 commit comments

Comments
 (0)