[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--", "--emit=files"]

[tasks.clean]
command = "cargo"
args = ["clean"]

[tasks.build_debug]
command = "cargo"
args = ["build"]

[tasks.run]
command = "cargo"
args = ["run"]

[tasks.build_release]
command = "cargo"
args = ["build", "--release"]
dependencies = ["clean"]

[tasks.test]
command = "cargo"
args = ["test"]
# dependencies = ["clean"]

[tasks.post_build]
script_runner = "python"
script_extension = "py"
script = { file = "post_build.py" }

[tasks.debug]
dependencies = [
    "format",
    "build_debug",
    "post_build"
]

[tasks.release]
dependencies = [
    "format",
    "build_release",
    "post_build"
]