-
Notifications
You must be signed in to change notification settings - Fork 14
Building
satendra pal singh edited this page Jun 14, 2022
·
11 revisions
NOTE: The updated version of this page is available here
- msys2 - https://www.msys2.org/
- rust - gnu toolchain
We use gcc and clang a lot, MSVC might work but it's uncharted territory.
Make sure you pull this repository with dependencies git submodule update --init --recursive
Make sure to use the gnu toolchain for rust with rustup default stable-x86_64-pc-windows-gnu
- Open mingw prompt (use
mingw64.exe
from msys2 folder), run those commands:-
pacman -Syu --noconfirm
- to do a full update, you might have to reopen the prompt window -
pacman -S --needed --noconfirm base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-ninja mingw-w64-x86_64-clang mingw-w64-x86_64-lld
- to install dependencies
-
- Add mingw bin to your system environment PATH variable (the windows one, control panel), in otder to run from powershell, vscode, etc
- Usually
C:\msys64\mingw64\bin
- Usually
- Open your favorite terminal (could be within visual studio code) pointing to this repo folder
- Run those commands:
mkdir build cd build cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .. ninja format; ninja rust_blocks; ninja cbl
Use a mingw64.exe
terminal for this.
-
Run:
./emsdk install latest ./emsdk activate latest source emsdk_env.sh
-
Go back to chainblocks directory and run:
mkdir build-wasm cd build-wasm cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake .. ninja format; ninja rust_blocks; ninja cbl