Skip to content

Commit

Permalink
Merge pull request #1589 from radixdlt/readme-windows-update
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
iamyulong authored Sep 22, 2023
2 parents 9b4b2ad + 864478d commit 779184b
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand All @@ -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
```

Expand All @@ -55,19 +59,19 @@ 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 <package_name>
cd <package_name>
```
2. Check out the files under your current directory:
- 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
```

Expand Down Expand Up @@ -100,20 +104,20 @@ 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 <path-to-your-scrypto-crate>:/src radixdlt/simulator
```

### Using published docker image
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 <path-to-your-scrypto-crate>:/src radixdlt/simulator
```

Expand Down

0 comments on commit 779184b

Please sign in to comment.