Add M1 instructions

This commit is contained in:
April Prichard 2023-04-07 22:13:35 -07:00 committed by GitHub
parent e2eb013cfc
commit 78ac550d3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
# Running on Windows using MSYS2
The following is
The following are instructions for building whisper-rs on Windows using the msys2 set of compilers.
1. install msys2/mingw by following [https://code.visualstudio.com/docs/cpp/config-mingw](`https://code.visualstudio.com/docs/cpp/config-mingw`)
1. Install g++ and make within msys2 ucrt64
@ -9,7 +9,7 @@ The following is
2. Add the msys2 ucrt64 bin folder to path `C:\msys64\ucrt64\bin`
2. Install make by running `pacman -S make` in msys2 ucrt66
3. Set rust to use msys2: by running `rustup toolchain install stable-x86_64-pc-windows-gnu` in Windows Powershell/Cmd
4. Add `.cargo/config` file in the project with the following contents:
4. Add `.cargo/config.toml` file in the project with the following contents:
```
[target.x86_64-pc-windows-gnu]
linker = "C:\\msys64\\ucrt64\\bin\\gcc.exe"
@ -27,3 +27,14 @@ Make sure you have installed and in the path:
- cmake
You may need to clone the git repository instead of using the Cargo package.
# Running on M1 OSX
To build on a M1 Mac, make sure to add the following to your project's `.cargo/config.toml`:
```
[target.aarch64-apple-darwin]
rustflags = "-lc++ -l framework=Accelerate"
```
See https://github.com/tazz4843/whisper-rs/pull/2 for more information.