set windows-shell := ["powershell.exe"]
export RUST_LOG := "info,wgpu_core=off"
export RUST_BACKTRACE := "1"
# Lists the available commands
@just:
just --list
# Fuzzy-picks an example with fzf and runs it, or runs one by name: `just run pbr`
[windows]
run name="":
if ('{{ name }}' -ne '') { cargo run -r --example {{ name }} --features wgpu,hdr,screenshot } else { $choice = (Get-ChildItem examples -Filter *.rs | ForEach-Object { $_.BaseName } | fzf --prompt 'example> '); if ($choice) { cargo run -r --example $choice --features wgpu,hdr,screenshot } }
# Fuzzy-picks an example with fzf and runs it, or runs one by name: `just run pbr`
[unix]
run name="":
#!/usr/bin/env bash
set -euo pipefail
if [ -n "{{ name }}" ]; then
cargo run -r --example "{{ name }}" --features wgpu,hdr,screenshot
else
choice=$(ls examples/*.rs | xargs -n1 basename | sed 's/\.rs$//' | fzf --prompt 'example> ')
[ -n "$choice" ] && cargo run -r --example "$choice" --features wgpu,hdr,screenshot
fi
# Lists the examples
[windows]
list:
@Get-ChildItem examples -Filter *.rs | ForEach-Object { $_.BaseName }
# Lists the examples
[unix]
list:
@ls examples/*.rs | xargs -n1 basename | sed 's/\.rs$//'
# Builds the crate and every example (compile gate)
build:
cargo build --examples --features wgpu,hdr,screenshot
# Runs the test suite
test:
cargo test -p nightshade-renderer --features wgpu,hdr,screenshot
# Clippy the crate and examples with warnings denied
lint:
cargo clippy --examples --features wgpu,hdr,screenshot -- -D warnings
# Formats the examples
format:
cargo fmt -p nightshade-renderer
# Builds the API documentation
doc:
cargo doc -p nightshade-renderer --no-deps --features wgpu,hdr,screenshot