From 35e84ef9158595c457551438ce840d07c2237b7b Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 17 Feb 2024 19:28:45 -0500 Subject: [PATCH] [docs] update dev quick start (#181) --- docs/core_devs/dev_quick_start.md | 42 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/docs/core_devs/dev_quick_start.md b/docs/core_devs/dev_quick_start.md index 325b8bf16..c31445a50 100644 --- a/docs/core_devs/dev_quick_start.md +++ b/docs/core_devs/dev_quick_start.md @@ -1,19 +1,17 @@ # Libra Dev Quick Start ## TL;DR -* You need our fork of diem before working on `libra-framework` -``` -git clone https://github.com/0LNetworkCommunity/diem -b release --single-branch +* You need our fork of `diem-node` before working on `libra-framework` +* compile `diem-node` to `$HOME/.cargo/bin` ``` +git clone https://github.com/0LNetworkCommunity/diem -b release --single-branch +export RUST_DIEM_COIN_MODULE="libra_coin" +export RUST_DIEM_COIN_NAME="LibraCoin" +cd diem +cargo build --profile cli -p diem-node --target-dir ~/.cargo/bin - -* compile `diem` and `diem-node` to `$HOME/.cargo/bin` - -``` -cargo build --profile cli -p diem -p diem-node --target-dir ~/.cargo/bin -# make them executable -chmod +x ~/.cargo/diem +# make it executable chmod +x ~/.cargo/diem-node ``` * export these env vars in your dev env, `~/.bashrc` or `~/.zshrc` @@ -36,23 +34,31 @@ git clone https://github.com/0LNetworkCommunity/diem -b release --single-branch This assumes that you have a `~/.cargo/bin` which is added to your environment's $PATH. ### build executables -You want to create a `diem` executable so you can run the `move` cli with the framework changes. +You want to build the `diem-node` (for smoke tests only). -You'll want `diem` (cli for move tests), `diem-node` (for smoke tests only). +There are two environment variables that are needed to use the correct Coin for +diem-node instead of a generic. -Note that the `--profile cli` compilation profile makes for much smaller binaries (e.g. `diem` goes from about 2GB to 30MB). +`export RUST_DIEM_COIN_MODULE: "libra_coin"` +`export RUST_DIEM_COIN_NAME: "LibraCoin"` + +Note that the `--profile cli` compilation profile makes for much smaller binaries (e.g. `diem-node` goes from about 2GB to 30MB). ``` -cargo build --profile cli -p diem -p diem-node --target-dir ~/.cargo/bin -# see you tomorrow. +# env variables needed for compilation +export RUST_DIEM_COIN_MODULE="libra_coin" +export RUST_DIEM_COIN_NAME="LibraCoin" + +# build it +cargo build --profile cli -p diem-node --target-dir ~/.cargo/bin +# see you tomorrow (welcome to rust). -# next day, make them executable. -chmod +x ~/.cargo/diem +# next day, make it executable. chmod +x ~/.cargo/diem-node ``` Just check those executables appear in your path. -`which diem` +`which diem-node` Now you can run commands as below. ## Running Move unit tests