diff --git a/README.md b/README.md index 975132e0759..980b514e6a9 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,14 @@ this repository may be used on the following networks: - Install prerequisites: - [node.js](https://nodejs.org/) v16 - [docker](https://docs.docker.com/get-docker/) v20.10+ + - [rust](https://www.rust-lang.org/tools/install) v1.67+ + - [wasm-bingen toolchain](https://rustwasm.github.io/wasm-bindgen/): + - **IMPORTANT (OSX only)**: built-in `llvm` on OSX does not work, needs to be installed from brew: + - `brew install llvm` + - LLVM installed from brew is keg only, and path to it must be provided in the profile file, e.g.`echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc` + - `cargo install wasm-bindgen-cli` + - _Depending on system, additional packages may need to be installed as a prerequisite for wasm-bindgen-cli. If anything is missing, installation will error and prompt what packages are missing (i.e. clang, llvm, libssl-dev)_ + - `rustup target add wasm32-unknown-unknown` - Run `corepack enable` to enable [corepack](https://nodejs.org/dist/latest/docs/api/corepack.html) and install yarn - Run `yarn setup` to install dependencies and configure and build all packages - Run `yarn start` to start the local dev environment built from the sources diff --git a/packages/wasm-dpp/README.md b/packages/wasm-dpp/README.md index 43e9919a27a..7f42341283c 100644 --- a/packages/wasm-dpp/README.md +++ b/packages/wasm-dpp/README.md @@ -15,27 +15,32 @@ In order for this binding to work, you have to have a rs-platform cloned alongside platform repo, so you can have access to the rust dpp. ## IMPORTANT! -### Build on a Mac - -To build on a mac, you need to perform two steps. First, install `clang` -from the homebrew. XCode's `clang` doesn't ship with the WASM support. Second, -just adding llvm to the `.zshrc` doesn't seem to work - run -`AR=/usr/local/opt/llvm/bin/llvm-ar CC=/usr/local/opt/llvm/bin/clang yarn workspace @dashevo/wasm-dpp build:node` -instead. -Alternatively, you can add the following to the `yarn workspace @dashevo/wasm-dpp build:node:mac` instead. +### Build on a Mac +Built-in `llvm` on OSX does not work, it needs to be installed from brew: +- `brew install llvm` +- LLVM installed from brew is keg only, and path to it must be provided in the profile file, e.g.`echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc` ### Class names minification Library consumers must ignore class names minification for `@dashevo/wasm-dpp` library in their bundlers. ## Table of Contents - -- [Install](#install) +- [Prerequisites](#Prerequisites) +- [Build](#build) - [Usage](#usage) - [Contributing](#contributing) - [License](#license) -## Install + + +## Prerequisites +- Install [Rust](https://www.rust-lang.org/tools/install) v1.67+ +- Add wasm32 target: `$ rustup target add wasm32-unknown-unknown` +- Install wasm-bingen-cli: `cargo install wasm-bindgen-cli` + - _Depending on system, additional packages may need to be installed as a prerequisite for wasm-bindgen-cli. If anything is missing, installation will error and prompt what packages are missing (i.e. clang, llvm, libssl-dev)_ + +## Build +`$ yarn build` ## TODO