/rscdk

Rust Smart Contracts Development Kit For EOS

Primary LanguageRustApache License 2.0Apache-2.0

build codecov

Rust Smart Contracts Development Kit

Getting Started

Getting involved

Debugging

Install ipyeos first for debugging.

python3 -m pip install ipyeos

In order to update to a new version, use the following command:

python3 -m pip install -U ipyeos

Then run the debugging server:

eosdebugger

On Windows, you need to use a docker image to run a debugging server.

docker pull ghcr.io/uuosio/ipyeos:latest

Run the debugging server on the Windows platform:

docker run -it --rm -p 9090:9090 -p 9092:9092 -t ghcr.io/uuosio/ipyeos

Build contract

rust-contract build

Start debugging:

Debugging

Code Coverage Analysis

First, install grcon

cargo install grcov

Second, install llvm-tools

rustup component add llvm-tools-preview

Generate code coverage report in html

# rm -rf ./target

export CARGO_INCREMENTAL=0
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off"
cargo +nightly test
grcov . -s . -t html --llvm --branch --ignore-not-existing -o ./target/debug/coverage/

You will need to start eosdebugger first if you didn't do that. cargo +nightly test command depends on that to run.

Code Coverage