From 2bc7ea9e06a1532ab86039afa43d4c65ca5b6308 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Fri, 16 Jul 2021 06:12:30 -0700 Subject: [PATCH] Readme development section (#70) --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 35205bc..7439d8e 100644 --- a/README.md +++ b/README.md @@ -264,3 +264,28 @@ ExecStart=/usr/local/bin/prometheus_wireguard_exporter -n /etc/wireguard/peers.c [Install] WantedBy=multi-user.target ``` + +## Development + +### Locally + +1. Install [Rust](https://www.rust-lang.org/tools/install) +1. Install [Rust Analyzer](https://rust-analyzer.github.io/manual.html#installation) and set it up with your editor +1. Install [Clippy](https://github.com/rust-lang/rust-clippy): `rustup clippy` + +You may want to install Docker as well to build and run the Docker image. + +The following commands are available: + +```sh +# Download dependencies +cargo fetch +# Build the program +cargo build +# Run tests +cargo test +# Run clippy to lint +cargo clippy +# Build the Docker image +docker build -t mindflavor/prometheus_wireguard_exporter . +```