summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-04-29 13:04:38 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-04-29 13:04:38 +0200
commitd60ac28946bc30c36610d17067400af286625d9f (patch)
tree061e0b0eb292c0ef686d105fd5f782b3728db324
parent6cdeab7820d5e56537dc161bd8037ca41d110b68 (diff)
Filled in more of the dev guide
-rw-r--r--readme.org43
1 files changed, 34 insertions, 9 deletions
diff --git a/readme.org b/readme.org
index 7c4e9a6..b7c9702 100644
--- a/readme.org
+++ b/readme.org
@@ -113,8 +113,8 @@ it to work on Windows.
tool Cargo. Information on how to install these tools is available on [[https://www.rust-lang.org/learn/get-started][the
Rust website]].
- C Compiler
- - This is used to built one of the dependencies, libgit2.
- # TODO how to get one?
+ - This is used to built one of the dependencies, libgit2. This can be
+ obtained from your operating system's package manager.
- Docker
- Some of the tests use Docker to create a simulated environment. This can be
obtained from your operating system's package manager, or the [[https://www.docker.com/][Docker
@@ -136,29 +136,54 @@ it to work on Windows.
If you're running Arch Linux, these are the steps you'll need to get your
environment ready.
-# TODO: Test this in a VM, not in Docker. The Docker in Docker stuff doesn't
-# work well.
-
#+begin_src sh
sudo pacman -S rustup docker git openssh gcc
+
+ # Rust
rustup default stable
- sudo usermod -a -G docker $(whoami)
+
+ # Docker
+ sudo usermod -a -G docker $USER
sudo systemctl start docker.service
+ # Note: you need to log out and in again for the new group to take effect
+
+ # TODO: The tests themselves should set these, scoped to the test environment
+ git config --global user.email "you@example.com"
+ git config --global user.name "Your Name"
+ git config --global init.defaultBranch main
#+end_src
** Running Tests
+All unit tests are run with Cargo.
+
+#+begin_src sh
+ cargo test --workspace
+#+end_src
+
** Linting
+Clippy should be used for linting. This can be installed using Rustup.
+
+#+begin_src sh
+ rustup component add clippy
+#+end_src
+
+And it can be run via Cargo.
+
+#+begin_src sh
+ cargo clippy
+#+end_src
+
** Building a Release Binary
+Release binaries should be built in release mode.
+
#+begin_src sh
cargo build --release
#+end_src
-# need to have docker installed
-# cargo test --workspace
-# cargo clippy
+After running this, the binary is available in =./target/release/shackle=
* Roadmap / Issue Tracker TODO list