Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
atenjin committed May 26, 2021
1 parent 35bb268 commit 0d68276
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ More relevant links:
* [Canvas UI](https://paritytech.github.io/canvas-ui/#/upload) ‒ Frontend for contract deployment and interaction
* [Canvas Node](https://github.com/paritytech/canvas-node) ‒ Simple Substrate blockchain which includes smart contract functionality

**This is a forked version to provide debug feature in Patract's toolchain.**

## Installation

Expand All @@ -49,7 +50,7 @@ More relevant links:
There's only an old version in your distributions package manager? Just use a
[binary release](https://github.com/WebAssembly/binaryen/releases).

* Step 3: `cargo install --force cargo-contract`
* Step 3: `cargo install --git https://github.com/patractlabs/cargo-contract.git --branch tag-v0.12.1 --force`


## Usage
Expand Down Expand Up @@ -82,6 +83,26 @@ do so is `cargo +nightly contract build`.
To avoid having to always add `+nightly` you can also set `nightly` as the default
toolchain of a directory by executing `rustup override set nightly` in it.

###### debug feature

The different of the forked from the official branch is that we have `debug` flag in command `build`.

This is used for wasm backtrace, for adding `--debug` will retain the Custom/Name section part in wasm. And in debug mode,
the default optimization for `wasm-opt` is 0, and without debug, the default optimization is 3 in original version.
You can also set the optimization level by `--optimization-passes` in debug mode.

```
...
USAGE:
cargo contract build [FLAGS] [OPTIONS]
FLAGS:
-d, --debug Enable debug info in the wasm bundle
...
```

##### `cargo contract check`

Checks that the code builds as WebAssembly. This command does not output any `<name>.contract`
Expand Down

0 comments on commit 0d68276

Please sign in to comment.