[tools]
deno = "latest"
rebar = "latest"
rust = { version = "nightly", components = "rust-analyzer,clippy,rustc-codegen-cranelift-preview" }
watchexec = "latest"
"cargo:sqlx-cli" = "0.8.6"

[tasks.dev-services]
run = "docker compose up"
dir = "./dev-services"

[tasks.server]
run = "cargo run serve"
description = "Run the server. For development: `mise watch --restart serve`."
sources = ["**/*.rs", "**/*.html"]

[tasks.build-svelte]
run = "deno run -A npm:vite build"
dir = "./svelte"
sources = ["**/*.svelte.ts", "**/*.svelte"]

[tasks.docker-services]
dir = "./dev-services"
run = "docker compose up"

[tasks.pg-container]
run = "sh ./dev-services/run-pg-with-apple-container.sh"

[tasks.migrations]
dir = "./phono-models"
run = "sqlx migrate run"

[tasks.prepare-sqlx]
run = "cargo sqlx prepare --workspace"

[env]
RUST_LOG = "debug"
