From 345df2051ca28b4ed1937823e9fd23d0e1f0e285 Mon Sep 17 00:00:00 2001 From: FintanH Date: Wed, 24 Jul 2019 14:35:15 +0100 Subject: Add section to README for contributing. It describes how to set up the git repo, rustup, and cargo --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 66748dc..1fe59da 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,62 @@ This is still quite unstable so use at your own risk. Documentation is severely You can see what's missing from the commented out tests in `dhall/src/normalize.rs` and `dhall/src/typecheck.rs`. +# Contributing + +This section will cover how we can get started on contributing this project. + +## Setting up the repository + +To get a copy of this repository we can run: + +```bash +$ git clone https://github.com/Nadrieril/dhall-rust.git +``` + +But we also might note that it's better practice to fork the repository to your own workspace. +There you can make changes and submit pull requests against this repository. + +After the repositry has been cloned we need to update the [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) +in the project, i.e. `dhall-lang`. We can do this by running: + +```bash +$ git submodule update --init --recursive +``` + +## Building and Testing + +A preferred method among the Rust community for developing is to use [`rustup`](https://rustup.rs/). + +It can be installed by running: + +```bash +$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +or if [nix](https://nixos.org/) is your tool of choice: + +```bash +$ nix-shell -p rustup +``` + +Once `rustup` is installed we can get it to manage our toolchain by running: + +```bash +$ rustup toolchain install nightly +``` + +Then we can manage our building and testing with the [`cargo`](https://crates.io/) dependency manager: + +```bash +$ cargo build +``` + +```bash +$ cargo test +``` + +Now we can have fun and happy contributing! + ## License Licensed under the terms of the 2-Clause BSD License ([LICENSE](LICENSE) or -- cgit v1.2.3