diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..a3dbde4 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,10 @@ +# Fix: whisper.cpp (whisper-rs-sys) is configured by the cmake crate, which +# hardcodes opt_level(0) and overwrites CMake's default MSVC Release flags +# (/O2 /Ob2 /DNDEBUG) with unoptimized ones — ggml's CPU kernels were compiled +# at /Od with asserts on, making CPU-only transcription ~40x slower than real +# time (bench finding W1, docs/benchmarks/2026-07-parakeet-vs-whisper.md). +# cc-rs appends these env flags after its own, so they win for every native +# dep. MSVC-only flags are fine: WhispAssist is a Windows-native app. +[env] +CFLAGS = "/O2 /DNDEBUG" +CXXFLAGS = "/O2 /DNDEBUG"