Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 16 additions & 11 deletions packages/wasm-dpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down