diff --git a/README.md b/README.md index c57dc5a31..e6190c107 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 `.contract`