elpiel / ray-tracing

Ray tracing by the books of Ray tracing in a Weekend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ray tracing Build Status codecov

In a weekend

Dependencies

  • Cargo make:

    cargo install --force cargo-make

  • Clippy:

    rustup component add clippy

    Note: cargo make will take care to install this when you run task containing it the check-clippy task.

  • Rustfmt

    rustup component add rustfmt

    Note: cargo make will take care to install this when you run task containing it the check-format or format 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:

Format (Rustfmt)

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 run cargo clean)
    • cargo make check-all Note: Cleans the previous artifacts (runs cargo clean)
  • Clean build (cleans the previous artifacts and runs the tests)

    • cargo make clean-build Note (runs cargo 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

About

Ray tracing by the books of Ray tracing in a Weekend


Languages

Language:Rust 100.0%