In a weekend
Dependencies
-
cargo install --force cargo-make
-
rustup component add clippy
Note:
cargo make
will take care to install this when you run task containing it thecheck-clippy
task. -
rustup component add rustfmt
Note:
cargo make
will take care to install this when you run task containing it thecheck-format
orformat
tasks.
Running the project
cargo run
Running the tests
cargo make test
Code checks
Apart from the tests, there are couple of checks that are running and they should pass in order for the PRs to be passing the builds:
Rustfmt)
Format (You can check your formatting by this command:
cargo make check-format
If you want to fix the formatting automatically, just drop the check:
cargo make format
Clippy
You can also run Cargo clippy, for now with one lint is disabled, until I fix it in a appropriate way. To check the code, please run:
cargo make check-clippy
Additional make commands:
-
Run all the checks + build the project and run the tests:
cargo make check-quick
Note: Does not clean the previous artifacts (doesn't runcargo clean
)cargo make check-all
Note: Cleans the previous artifacts (runscargo clean
)
-
Clean build (cleans the previous artifacts and runs the tests)
cargo make clean-build
Note (runscargo clean
)
-
Clean the previous artifacts (runs
cargo clean
underneath)cargo make clean
Future work:
- Add git hooks to repository
- Fix codecov for the binary.
TODOs:
- Write tests for the Hitable::hit of a Sphere
- Write tests for the Camera