Skip to content

Hacking and contributing

Simon B edited this page Dec 26, 2017 · 12 revisions

Hacking

  • git checkout master; git pull; git checkout -b feature/my_branch
  • change code
  • add tests for new code
  • cargo test --all
  • All good? make +rustfmt happy, then submit a Pull Request on github (google for good guides on how github PR's work)

And why not try running your own little grin network? See the local net documentation

Testing

Preparations

cargo install cargo-check
cargo install cargo-cov
cargo install cargo-tarpaulin
````

## Run
Run a quick syntax check with `cargo check`
Run the full test suite with `cargo test --all`
Run a test coverage analysis with `cargo cov test`

### Troubleshooting
 * Q: `cargo cov test` gives error:
```error: Native profiler library not found
caused by: no default profiler library for this target, please supply the --profiler option```
 A: Install clang with `sudo apt-get install clang` or similar.
Clone this wiki locally