Windows:
Note Install Clang into C:\Program Files\LLVM
or set LIBCLANG_PATH
env.
Winget
packages
winget install -e --id JernejSimoncic.Wget
winget install -e --id 7zip.7zip
Linux:
Based on tauri/prerequisites/#setting-up-linux
sudo apt-get update
sudo apt-get install -y ffmpeg libopenblas-dev # runtime
sudo apt-get install -y pkg-config build-essential libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev clang cmake libssl-dev # tauri
sudo apt-get install -y libavutil-dev libavformat-dev libavfilter-dev libavdevice-dev # ffmpeg
Vulkan (Linux)
sudo apt-get install -y mesa-vulkan-drivers
Vulkan (Windows)
Run as admin once!!!
bun run scripts\pre_build.js --vulkan
Install dependencies from desktop
folder
bun install
Execute pre build scripts and follow the instructions it provide
bun scripts/pre_build.js
See whisper.cpp#nvidia-support
-
Enable
cuda
feature inCargo.toml
-
Install
cuda
-
Add to
tauri.windows.conf.json
tauri.windows.conf.json
{
"bundle": {
"resources": {
"ffmpeg\\bin\\x64\\*.dll": "./",
"openblas\\bin\\*.dll": "./",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.5\\bin\\cudart64_*": "./",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.5\\bin\\cublas64_*": "./",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.5\\bin\\cublasLt64_*": "./"
}
}
}
- Build in
Powershell
$env:CUDA_PATH = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5"
$env:CudaToolkitDir = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5"
bun run scripts/pre_build.js --openblas --build
AMD support is only available under linux environment
-
Install
rocm toolkit
-
Run
bun scripts/pre_build.js --amd
-
Run
export ROCM_VERSION="your rocm version"
cd desktop
bunx tauri build
On Windows when run pre_build
with --vulkan
you may need to run it with admin rights first time thanks to vulkan recent changes...
On Ubuntu you may need to copy some libraries for ffmpeg_next
library
sudo cp -rf /usr/include/x86_64-linux-gnu/libsw* /usr/include/
sudo cp -rf /usr/include/x86_64-linux-gnu/libav* /usr/include/
If the CPU failed to execute an instruction, then build with the following environment variable
WHISPER_NO_AVX = "ON"
WHISPER_NO_AVX2 = "ON"
WHISPER_NO_FMA = "ON"
WHISPER_NO_F16C = "ON"
Rust analyzer failed to run on windows
- Execute
cargo clean
- Add to
settings.json
:
"rust-analyzer.cargo.extraEnv": {
"FFMPEG_DIR": "${workspaceFolder}\\desktop\\src-tauri\\ffmpeg",
"OPENBLAS_PATH": "${workspaceFolder}\\desktop\\src-tauri\\openblas",
"LIBCLANG_PATH": "C:\\Program Files\\LLVM\\bin"
}
- Relaunch
VSCode
Otherwise you will get error such as ggml_gallocr_needs_realloc: graph has different number of nodes
and it will transcribe slower.
export RUST_LOG=trace
cargo test -- --nocapture
cargo test -p vibe_core --release -- --nocapture
cargo fmt
cargo clippy
- Increment verison in
tauri.conf.json
and commit - Create new git tag and push
git tag -a v<version> -m "v<version>" && git push --tags
It will create releases for Windows
, Linux
, and macOS
Along with latest.json
file (used for auto updater).
When Release
action finish, it will run Deploy landing
action
and update downloads links in landing page.
bunx tinypng-go static/*.png
go install github.com/mandolyte/mdtopdf/cmd/md2pdf@latest
md2pdf -i docs/PRIVACY_POLICY.md -o docs/PRIVACY_POLICY.pdf
ffmpeg -i file.wav -ar 16000 -ac 1 -c:a pcm_s16le normal.wav
- Install gh cli
gh pr checkout <url>
git push <fork url>
bunx ncu -u -t newest
cd src-tauri
cargo install cargo-edit
rm -rf ../Cargo.lock
CARGO_NET_GIT_FETCH_WITH_CLI=true
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo upgrade
# OR
cargo +nightly -Zunstable-options update --breaking
{
"rust-analyzer.runnables.extraEnv": {
"FFMPEG_DIR": "${workspaceFolder}\\desktop\\src-tauri\\ffmpeg",
"OPENBLAS_PATH": "${workspaceFolder}\\desktop\\src-tauri\\openblas",
"LIBCLANG_PATH": "C:\\Program Files\\LLVM\\bin"
},
"rust-analyzer.runnables.extraArgs": ["--release"]
}
bun run scripts/pre_build.js
# Export env
$env:PATH += ";$pwd\desktop\src-tauri\openblas\bin"
cargo test --target x86_64-pc-windows-msvc --features "vulkan" -p vibe_core --release -- --nocapture
gh cache delete -a
- Always update crates and lock in specific commit so it will be easy to revert!!
- Don't upgrade important crates such as tauri as long as it stable and works and there's no real need!!
See Self sign tauri on Windows
rustup nightly install
rustup component add rustc-codegen-cranelift-preview --toolchain nightly
# Unix
CARGO_PROFILE_DEV_CODEGEN_BACKEND="cranelift" cargo +nightly build -Zcodegen-backend
# Powershell
$env:CARGO_PROFILE_DEV_CODEGEN_BACKEND="cranelift" ; cargo +nightly build -Zcodegen-backend