These instructions target Ubuntu 20.4, and VS Code
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
Full guide here: (OS_dependencies.md)
Full guide here: (Improve-Rust-compile-times-with-sccache.md)
- Install rust-wrapper extension from VS Code Marketplace
in your .bashrc you should add:
NODE_ENV=test
TEST=y
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 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.