How to build cardano-serializer-lib using Windows WSL
Follow these instructions to successfully build cardano-serialization-lib on Windows (because using e.g. Git Bash will simply not work).
This assumes you already have Debian running on the Windows Subsystem for Linux (WSL)
-
Install python 2.7
sudo apt-get install python2.7 -
Install curl
sudo apt-get install curl -
Install rust and choose option 1 (Proceed with installation (default))
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -
Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash -
Install cmake
sudo apt-get install cmake sudo apt-get install build-essential -
Install wasm-pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -
Restart your bash
source ~/.bashrc -
Build the repository
git clone git@github.com:Emurgo/cardano-serialization-lib.git cd cardano-serialization-lib git submodule update --init --recursive nvm install v12.18.1 nvm use npm install npm run rust:build-nodejs
All done, you should now find your ready-to-use libraries inside folder rust/pkg.