-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #476 from filecoin-project/add-contrib
Create CONTRIBUTING.md
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### Description | ||
|
||
### Acceptance criteria | ||
|
||
### Risks + pitfalls | ||
|
||
### Where to begin |