Justfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. all: build test
  2. all-release: build-release test-release
  3. export DOG_DEBUG := ""
  4. # compiles the dog binary
  5. @build:
  6. cargo build
  7. # compiles the dog binary (in release mode)
  8. @build-release:
  9. cargo build --release --verbose
  10. strip target/release/dog
  11. # runs unit tests
  12. @test:
  13. cargo test --all -- --quiet
  14. # runs unit tests (in release mode)
  15. @test-release:
  16. cargo test --release --all --verbose
  17. # renders the documentation
  18. @doc args="":
  19. cargo doc --no-deps --all {{args}}
  20. # runs fuzzing on the dns crate
  21. @fuzz:
  22. cargo +nightly fuzz --version
  23. cd dns; cargo +nightly fuzz run fuzz_parsing -- -jobs=`nproc` -workers=`nproc` -runs=69105
  24. # prints out the data that caused crashes during fuzzing as hexadecimal
  25. @fuzz-hex:
  26. for crash in dns/fuzz/artifacts/fuzz_parsing/crash-*; do echo; echo $crash; hexyl $crash; done
  27. # removes fuzz log files
  28. @fuzz-clean:
  29. rm dns/fuzz/fuzz-*.log
  30. # lints the code
  31. @clippy:
  32. touch dns/src/lib.rs
  33. cargo clippy
  34. # generates a code coverage report using tarpaulin via docker
  35. @coverage-docker:
  36. docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin cargo tarpaulin --all --out Html
  37. # updates versions, and checks for outdated ones
  38. @update:
  39. cargo update; cargo outdated
  40. cd dns/fuzz; cargo update; cargo outdated