Closed nickdanis closed 1 year ago
There is actually a way to install mdbook-katex
on windows. All you need to do is install the MinGW toolchain with MSYS2 and then install for the x86_64-pc-windows-gnu
target.
First install MSYS2, e.g. with scoop
:
scoop install msys2
Once installed, run MSYS2 once for the first-time setup. Inside the msys2 shell, install the base-devel
and mingw-w64-x86_64-toolchain
packages, as documented on the MSYS2 website:
pacman -Syu
# it seems one cannot upgrade msys2 and install packages at the same time
# because it will want to restart the shell after upgrading
pacman -Sy base-devel mingw-w64-x86_64-toolchain
Then, you will also need to add the mingw bin
directory to your path, as well as the msys2 usr/bin
directory. This depends on the installation, for scoop the directories are %USERPROFILE%\scoop\apps\msys2\current\mingw64\bin
and %USERPROFILE%\scoop\apps\msys2\current\usr\bin
(don't forget to restart your shell after).
When using the installers from the MinGW or MSYS2 websites, the procedure might be slightly different.
Lastly, add the required target with rustup:
rustup target add x86_64-pc-windows-gnu
Then, to install mdbook-katex
, simply specify the target for the install:
cargo install mdbook-katex --target=x86_64-pc-windows-gnu
It should build now since I changed the Windows build to with duktype
.
Please open another issue if you have other issues.
Running
cargo install mdbook-katex
using cargo 1.53.0 on Windows 10 seems to work until eventually the build fails with this error:Even though it seems to be an issue with
libquickjs-sys v0.9.0
I wonder if there's a workaround to still get mdbook-katex installed. (I'm new to the rust/cargo ecosystem.)