Build options:
- Native
- Docker
- Virtualised
- Emulated
Using Vagrant and VirtualBox has a baseline for building needs, including tools, libs and testing
Linux ARM64 can be built using Vagrant and VirtualBox or Docker and cross
From - https://github.com/tari-project/tari-dan/blob/development/scripts/install_ubuntu_dependencies.sh
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --assume-yes \
apt-transport-https \
ca-certificates \
curl \
gpg \
openssl \
libssl-dev \
pkg-config \
libsqlite3-dev \
git \
cmake \
dh-autoreconf \
libc++-dev \
libc++abi-dev \
libprotobuf-dev \
protobuf-compiler \
libncurses5-dev \
libncursesw5-dev \
build-essential \
zip
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup target add wasm32-unknown-unknown
export NODE_MAJOR=20
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \
sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" | \
sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --assume-yes \
nodejs
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --assume-yes \
pkg-config-aarch64-linux-gnu \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu
rustup target add aarch64-unknown-linux-gnu
rustup toolchain install stable-aarch64-unknown-linux-gnu
rustup target list --installed
rustup toolchain list
mkdir -p ~/src
cd ~/src
git clone git@github.com:tari-project/tari-dan.git
cd tari-dan
cargo build \
--target aarch64-unknown-linux-gnu \
--bin tari_dan_wallet_cli
cargo build --locked --release \
--target aarch64-unknown-linux-gnu
cross build --locked --release \
--target aarch64-unknown-linux-gnu