Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.35 KB

setup_dev_env.md

File metadata and controls

34 lines (23 loc) · 1.35 KB

These instructions target Ubuntu 20.4, and VS Code

Hardware

Building on Rust is slow, and on first build you may experience cc errors related to running out of memory. Target 16bg+ of memory and quad core CPUs.

Optionally connect to a cloud remote machine, instead of using local. VS Code has mature tools for this. https://code.visualstudio.com/docs/remote/remote-overview

Get OS dependencies

Full guide here: (OS_dependencies.md)

Set up sccache for faster build times

Full guide here: (Improve-Rust-compile-times-with-sccache.md)

Install VS Code extensions

Set Environment Variables

in your .bashrc you should add:

NODE_ENV=test
TEST=y

Build all packages

The project is a mono-repo, and all code is in Rust, targeting stable version 1.46.0

cargo build --all --bins --exclude cluster-test

Note on Move compiler

Note that when Move stdlib code changes, it is necessary to rerun the stdlib compiler. The compiler also created generated code bindings in Rust for transaction scripts.

cargo r -p move-stdlib --release

The one exception for this, is when running functional tests, which will run stdlib for you. If your e2e tests or swarm are failing inexplicably, it's likely that the stdlib has not been compiled.