From 864478de61b8dc67d13ce145faae102ea97eacbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Strug?= <114988195+mstrug-rdx@users.noreply.github.com> Date: Fri, 22 Sep 2023 10:31:45 +0200 Subject: [PATCH] Update README.md --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c16c0835494..974a0be6075 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,21 @@ Documentation: https://docs-babylon.radixdlt.com/main/scrypto/introduction.html ## Installation -1. Install Rust - this requires Rust 1.60+ (if rust is already installed, upgrade with `rustup update`) +1. Install Rust - this requires Rust 1.70+ (if rust is already installed, upgrade with `rustup update`) * Windows: * Download and install [`rustup-init.exe`](https://win.rustup.rs/x86_64) * Install "Desktop development with C++" with [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16) * Install [LLVM 13.0.1](https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/LLVM-13.0.1-win64.exe) (make sure you tick the option that adds LLVM to the system PATH) + * Enable git long path support: + ```bash + git config --system core.longpaths true + ``` * macOS: * Make sure you have the xcode command line tools: `xcode-select --install`. * Install cmake: `brew install cmake` * Install the Rust compiler: ```bash - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` * Linux: * Make sure a C++ compiler, LLVM and cmake is installed (`sudo apt install build-essential llvm cmake`). @@ -30,21 +34,21 @@ Documentation: https://docs-babylon.radixdlt.com/main/scrypto/introduction.html * Windows: * Start a new PowerShell * Linux and macOS: - ``` + ```bash source $HOME/.cargo/env ``` 3. Add WebAssembly target - ``` + ```bash rustup target add wasm32-unknown-unknown ``` 4. Install simulator - ``` + ```bash git clone https://github.com/radixdlt/radixdlt-scrypto.git cd radixdlt-scrypto cargo install --path ./simulator ``` 5. (Optional) Open Scrypto documentation for later use - ``` + ```bash ./doc.sh ``` @@ -55,7 +59,7 @@ If you want a quick walkthrough of how to deploy and run some code, please see t ### Writing Scrypto Code 1. Start by creating a new package: -``` +```bash scrypto new-package cd ``` @@ -63,11 +67,11 @@ cd - Source code is within `src/lib.rs`; - Test code is within `tests/lib.rs`. 3. Build your package: -``` +```bash scrypto build ``` 4. Run tests: -``` +```bash scrypto test ``` @@ -100,12 +104,12 @@ Follow this guide to build reproducible WASM and RDP files for your Scrypto blue The Dockerfile in the root of the repo should be work to build a docker image which will contain all the dependencies needed to be able build a blueprint using scrypto. Build the docker image like. From the repo root -``` +```bash docker build -t radixdlt/simulator . ``` Then build your package by just running -``` +```bash docker run -v :/src radixdlt/simulator ``` @@ -113,7 +117,7 @@ docker run -v :/src radixdlt/simulator If you would like to avoid building the docker image, you can skip the build step and do the second step directly, docker will automatically download the docker image we publish Build your blueprints directly with -``` +```bash docker run -v :/src radixdlt/simulator ```