These tools are required for building Downstream from source using make
.
A quicker way of running Downstream is to use Docker - see the main readme for details.
Tools required to build Downstream:
- Unity Editor 2021.3.13f1
- Unity WebGL submodule
(🖥 Windows The following should all be installed to WSL:)
- make
- gcc
- node (use nvm to match correct version)
- go (version go1.19.13 - similar versions may be fine)
- forge (version 0.2.0)
- ethereum tools (including solc and abigen)
- 🖥 Windows users will need to instal Windows Subsystem for Linux (WSL) and carefully follow the instructions as to which tools need to be installed to native Windows vs inside WSL.
- 🍏 MacOS supports all the tools natively.
- Install Unity Hub
- Install Unity Editor version 2021.3.13f1 via Unity LTS archive
- 🖥 Windows only Use
"C:\Program Files\Unity\Hub\Editor\2021.3.13f1"
as your install path (be sure to change the default path and folder name)
- 🖥 Windows only Use
- Install WebGL submodule
🖥 Windows only
-
Install WSL: Follow the guide at Microsoft WSL Install. Note that enabling virtualization might vary based on your CPU model.
-
Initial Setup in PowerShell:
- Run
wsl --install
. - Restart your PC.
- Upon reboot, follow the on-screen instructions to complete Ubuntu setup.
- Create a username and password as per Microsoft's best practices.
- Run
-
Switch to WSL1: The default WSL2 can be changed to WSL1, which works better for our purposes.
- In PowerShell, run
wsl --list --verbose
to find your Ubuntu distribution name. - Switch to WSL1 with
wsl --set-version [distribution name] 1
. Example:wsl --set-version Ubuntu 1
.
- In PowerShell, run
-
Installing WSL essentials
-
Access WSL: Use
wsl
command in PowerShell or open the Ubuntu application. -
Install gcc & make:
sudo apt update sudo apt install build-essential
⚠️ All remaining tools should be installed to WSL if running on Windows
- Recommended to use nvm (nvm install script).
- Run the following commands:
Navigate to the
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
ds
directory and runnvm install
.
🖥 Windows:
- Note ds path with be under /mnt/; e.g.
$cd /mnt/d/playmint/ds
- Extra Node configuration under WSL may be necessary:
- Set environment variable:
NODE_OPTIONS=--max-old-space-size=4096
- Restart your machine.
- Update Node packages:
npm update -g
- Update Node packages:
npm cache clean -f
- Set environment variable:
- Download go1.19.13.linux-amd64.tar.gz from Go Downloads.
- Follow installation instructions at Go Install Guide;
⚠️ 🖥 Windows use the Linux download and install instructions to setup in WSL.
🖥 Windows
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
sudo apt-get install abigen
🍏 MacOS
brew tap ethereum/ethereum
brew install ethereum
Follow instructions at Foundry Installation:
curl -L https://foundry.paradigm.xyz | bash
foundryup