Skip to content

Commit

Permalink
Merge pull request #476 from filecoin-project/add-contrib
Browse files Browse the repository at this point in the history
Create CONTRIBUTING.md
  • Loading branch information
laser committed Feb 13, 2019
2 parents e6cce17 + 6f1528d commit 2f242af
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing

Welcome, it is great that you found your way here. In order to make the best of all our time, we have gathered some notes
below which we think can be helpful when contributing to this project.

## Getting Started

Please start by reviewing this file.

## Coding Standards

- No compiler warnings.
- No [clippy](https://github.com/rust-lang/rust-clippy) warnings.
- Minimize use of `unsafe` and justify usage in comments.
- Prefer `expect` with a good description to `unwrap`.
- Write unit tests in the same file.
- Format your code with `rustfmt`
- Code should compile on `stable` and `nightly`. If adding `nightly` only features they should be behind a flag.
- Write benchmarks for performance sensitive areas. We use [criterion.rs](https://github.com/japaric/criterion.rs).


## General Guidelines
- PRs require code owner approval to merge.
- Please scope PRs to areas in which you have expertise. This code is still close to research.
- Welcome contribution areas might include:
- SNARKs
- Proof-of-replication
- Rust improvements
- Optimizations
- Documentation (expertise would require careful reading of the code)

## Resources for learning Rust

- Beginners
- [The Rust Book](https://doc.rust-lang.org/book/)
- [Rust Playground](https://play.rust-lang.org/)
- [Rust Docs](https://doc.rust-lang.org/)
- [Clippy](https://github.com/rust-lang/rust-clippy)
- [Rustfmt](https://github.com/rust-lang/rustfmt)
- Advanced
- What does the Rust compiler do with my code? [Godbolt compiler explorer](https://rust.godbolt.org/)
- How to safely write unsafe Rust: [The Rustonomicon](https://doc.rust-lang.org/nomicon/)
- Did someone say macros? [The Little Book of Rust Macros](https://danielkeep.github.io/tlborm/book/index.html)

## Licensing

As mentioned in the [readme](README.md) all contributions are dual licensed under Apache 2 and MIT.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ Or better, generate the documentation locally (until repository is public). Foll
- [Go implementation of filecoin-proofs API](https://github.com/filecoin-project/go-filecoin/blob/master/proofs/rustprover.go) and [associated interface structures](https://github.com/filecoin-project/go-filecoin/blob/master/proofs/interface.go).
- [Go implementation of sector-base API](https://github.com/filecoin-project/go-filecoin/blob/master/proofs/disk_backed_sector_store.go).

## Contributing

See [Contributing](./contributing.md)

## License

The Filecoin Project is dual-licensed under Apache 2.0 and MIT terms:
Expand Down
7 changes: 7 additions & 0 deletions issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Description

### Acceptance criteria

### Risks + pitfalls

### Where to begin

0 comments on commit 2f242af

Please sign in to comment.