The easiest way to try Shiika on Windows is to use WSL2.
Using Shiika without WSL2 is not easy, but possible. This document describes how.
- 64bit Windows
- Rust
- Visual Studio >= 2019 (Tested with Professional but Community edition should suffice too)
- CMake (to build LLVM and bdwgc-alloc)
- Download from https://cmake.org/download/ and install
- Python3 (to build LLVM)
First, you need to build LLVM because it seems that
- the
llvm-syscrate relies onllvm-config.exe(no?) and - the llvm release package does not contain llvm-config.exe.
Steps to build your own llvm:
- Install Python3
- Get LLVM source
- https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.1 llvm-project-12.0.1.src.tar.xz
- You may need 7zip to unpack .xz
- Generate llvm.sln with cmake-gui
- Open cmake-gui
- Press
Browse Source...and selectsomewhere/llvmorg-12.0.1/llvm - Press
Browse Build...and selectsomewhere/llvmorg-12.0.1/build(or anywhere you like) - Press
Configure - Put
host=x64toOptional toolset to use (argument to -T) - Press
Finishand wait - Set
clang;lldtoLLVM_ENABLE_PROJECTS(TODO: not needed?) - Press
Generateand wait
- Build LLVM with VS
- Open build/llvm.sln with Visual Studio
- Choose
ALL_BUILDunderCMakePredefinedTargetsin solution explorer - Choose
Debugx64and build (llvm-config.exewill not be created withRelease)
Make sure these are in the PATH.
> clang -v
clang version 12.0.1
...
> cmake --version
cmake version 3.42.2
...
> llvm-config --version
12.0.1
Then try cargo build and see if succeeds.
> git clone https://github.com/shiika-lang/shiika
> cd shiika
> set LLVM_SYS_120_PREFIX=c:\somewhere\llvm-project-12.0.1\build\Debug\bin
> cargo build